Encoding method and apparatus therefor and decoding method and apparatus therefor

By determining quantization parameters based on block partitioning and size information, and combining prediction and differential quantization parameters, image encoding and decoding are optimized, solving the problem of balancing compression ratio and quality in image encoding technology, and achieving more efficient data transmission and image quality preservation.

CN116233432BActive Publication Date: 2026-01-16SAMSUNG ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310309979.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-02-09
Filing Date
2019-01-02
Publication Date
2026-01-16
Estimated Expiration
2039-01-02

Smart Images

  • Figure CN116233432B_ABST
    Figure CN116233432B_ABST
Patent Text Reader

Abstract

An encoding method and apparatus thereof and a decoding method and apparatus thereof are provided. A method for decoding an image includes the steps of determining a prediction quantization parameter of a current quantization group determined according to at least one of block partition information and block size information, determining a differential quantization parameter of the current quantization group, determining a quantization parameter of the current quantization group based on the prediction quantization parameter and the differential quantization parameter of the current quantization group, and dequantizing a current block included in the current quantization group according to the quantization parameter of the current quantization group.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with the application number "201980007205.3" and the title "Encoding method and apparatus therefor, and decoding method and apparatus therefor" filed on January 2, 2019. TECHNICAL FIELD

[0002] The present disclosure relates to an image encoding method and a decoding method, and more particularly, to a method of efficiently encoding and decoding information on a motion vector. BACKGROUND

[0003] When a high-quality image is encoded, a large amount of data is required. However, because the bandwidth available for transmission of image data is limited, the data rate applied to the transmission of image data can be limited. Therefore, in order for efficient transmission of image data, an image data encoding and decoding method that minimizes image quality degradation and improves compression rate is required.

[0004] Image data can be compressed by removing spatial redundancy and temporal redundancy between pixels. Because adjacent pixels generally have a common characteristic, encoding information of a data unit composed of pixels is transmitted to remove redundancy between adjacent pixels.

[0005] Instead of directly transmitting pixel values of pixels included in a data unit, information on a method of obtaining pixel values is transmitted. A prediction method in which a pixel value similar to an original value is predicted is determined for each data unit, and encoding information on the prediction method is transmitted from an encoder to a decoder. Because a predicted value is not exactly equal to an original value, residual data of a difference between the original value and the predicted value is transmitted from the encoder to the decoder.

[0006] When prediction is accurate, the size of encoding information for specifying a prediction method increases, but the size of residual data decreases. Therefore, a prediction method is determined in consideration of the size of encoding information and residual data. Specifically, a data unit divided from a picture has various sizes, and in this regard, when the size of a data unit increases, the possibility of prediction accuracy decreasing increases, and the size of encoding information decreases. Therefore, the size of a block is determined according to the characteristics of a picture.

[0007] The prediction method includes intra prediction and inter prediction. Intra prediction is a method of predicting pixels of a block from pixels adjacent to the block. Inter prediction is a method of predicting pixels by referring to pixels of a different picture referred to for a picture including the block. Therefore, spatial redundancy is removed by intra prediction, and temporal redundancy is removed by inter prediction.

[0008] As the number of prediction methods increases, the amount of encoding information for indicating the prediction method increases. Thus, the amount of encoding information can be reduced by predicting the encoding information to be applied to a block from different blocks.

[0009] Because the image data is allowed to be lost to a degree that the human eye cannot recognize the loss, the residual data can be lossy compressed according to the transform and quantization processes, and by doing so, the amount of residual data can be reduced. SUMMARY

[0010] TECHNICAL PROBLEM

[0011] An image encoding method and an image encoding apparatus for determining a quantization parameter of a quantization group based on block partition information and block size information are provided. An image decoding method and an image decoding apparatus for determining a quantization parameter of a quantization group based on block partition information and block size information are provided.

[0012] An image encoding method and an image encoding apparatus for matching a current block with a current quantization parameter unit based on at least one of a position and a size of the current block are provided. An image decoding method and an image decoding apparatus for matching a current block with a current quantization parameter unit based on at least one of a position and a size of the current block are provided.

[0013] Further, a computer-readable recording medium having recorded thereon a program for executing an image encoding method and an image decoding method according to an embodiment of the disclosure on a computer is provided.

[0014] TECHNICAL SOLUTION

[0015] An image decoding method is provided, including determining a prediction quantization parameter of a current quantization group determined according to at least one of block partition information and block size information; determining a differential quantization parameter of the current quantization group; determining a quantization parameter of the current quantization group based on the prediction quantization parameter and the differential quantization parameter of the current quantization group; and dequantizing a current block included in the current quantization group according to the quantization parameter of the current quantization group.

[0016] An image decoding apparatus including a processor is provided, wherein the processor is configured to determine a prediction quantization parameter of a current quantization group determined according to at least one of block partition information and block size information; determine a differential quantization parameter of the current quantization group; determine a quantization parameter of the current quantization group based on the prediction quantization parameter and the differential quantization parameter of the current quantization group; and dequantize a current block included in the current quantization group according to the quantization parameter of the current quantization group.

[0017] An image decoding method is provided, comprising: matching a current block with a current quantization parameter unit based on at least one of the position and size of the current block; obtaining a predicted quantization parameter for the current quantization parameter unit; obtaining a differential quantization parameter for the current quantization parameter unit; determining a quantization parameter for the current quantization parameter unit based on the predicted quantization parameter and the differential quantization parameter; and dequantizing the current block according to the quantization parameter of the current quantization parameter unit.

[0018] An image decoding apparatus including a processor is provided, wherein the processor is configured to: match a current block with a current quantization parameter unit based on at least one of the position and size of the current block; obtain a predicted quantization parameter for the current quantization parameter unit; obtain a differential quantization parameter for the current quantization parameter unit; determine a quantization parameter for the current quantization parameter unit based on the predicted quantization parameter and the differential quantization parameter; and dequantize the current block according to the quantization parameter of the current quantization parameter unit.

[0019] A computer-readable recording medium is provided, which records a program for performing the image encoding method and the image decoding method.

[0020] The technical problems to be solved by this disclosure are not limited to the above-described technical features, and other technical problems can be inferred from the following embodiments.

[0021] Beneficial effects

[0022] The quantization parameters of the block are determined based on the quantization group or quantization parameter unit, so that the information needed to determine the quantization parameters can be effectively compressed. Attached Figure Description

[0023] Figure 1 a This is a block diagram of an image encoding apparatus based on a tree-structured encoding unit according to an embodiment of the present disclosure.

[0024] Figure 1 b This is a block diagram of an image decoding device based on a tree-structured coding unit according to an embodiment.

[0025] Figure 2 The image decoding device according to an embodiment is shown to determine the processing of at least one coding unit by dividing the current coding unit.

[0026] Figure 3 The process of determining at least one coding unit by dividing non-square coding units according to an embodiment is illustrated.

[0027] Figure 4 The process of dividing coding units based on at least one of block shape information and partition shape information according to an embodiment is illustrated.

[0028] Figure 5 A method of determining a preset coding unit among odd-numbered coding units is shown according to an embodiment.

[0029] Figure 6 A process of processing a plurality of coding units when the plurality of coding units are determined by dividing a current coding unit is shown according to an embodiment.

[0030] Figure 7 A process of determining that a current coding unit is to be divided into odd-numbered coding units when the coding units cannot be processed in a preset order is shown according to an embodiment.

[0031] Figure 8 A process of determining at least one coding unit by dividing a first coding unit is shown according to an embodiment.

[0032] Figure 9 A shape to which a second coding unit having a non-square shape determined by dividing a first coding unit can be divided is limited when the second coding unit satisfies a preset condition according to an embodiment.

[0033] Figure 10 A process of dividing a square coding unit when division shape information indicates that the square coding unit is not to be divided into four square coding units is shown according to an embodiment.

[0034] Figure 11 A process by which a processing order among a plurality of coding units can be changed according to a process of dividing a coding unit is shown according to an embodiment.

[0035] Figure 12 A process of determining a depth of a coding unit as a shape and a size of the coding unit change when the coding unit is recursively divided such that a plurality of coding units are determined is shown according to an embodiment.

[0036] Figure 13 A depth that can be determined based on a shape and a size of a coding unit and a part index (PID) for distinguishing the coding unit are shown according to an embodiment.

[0037] Figure 14 A plurality of coding units are determined based on a plurality of preset data units included in a picture according to an embodiment.

[0038] Figure 15 A processing block that is used as a unit for determining a determination order of a reference coding unit included in a picture is shown according to an embodiment.

[0039] Figure 16 An image decoding apparatus for determining a quantization parameter of a block and decoding residual data of the block according to the determined quantization parameter.

[0040] Figures 17a to 17d is a diagram illustrating an embodiment of a method of determining a quantization group according to a number of quad-tree splits.

[0041] Figures 18a to 18c is a diagram illustrating an embodiment of a method of determining a quantization group in a maximum coding block for which a non-quad-tree split is applied.

[0042] Figure 19 is a diagram illustrating a syntax structure for a method of decoding a differential quantization parameter included in a bitstream when both quad-tree splits and non-quad-tree splits are allowed.

[0043] Figure 20 is a diagram illustrating an image decoding method of determining a quantization parameter for a block according to a quantization group and decoding residual data of the block according to the determined quantization parameter.

[0044] Figure 21 is a diagram illustrating an embodiment of a quantization parameter unit structure and a coding block tree structure.

[0045] Figure 22a and 22b is a diagram illustrating a method of determining a quantization parameter unit corresponding to a current block.

[0046] Figure 23a and Figure 23b is a diagram illustrating a correlation between a block and a quantization parameter unit.

[0047] Figure 24 is a diagram illustrating an image decoding method of determining a quantization parameter for a block according to a quantization parameter unit and decoding residual data of the block according to the determined quantization parameter.

[0048] Best mode

[0049] An image decoding method is provided, including determining a predicted quantization parameter of a current quantization group determined according to at least one of block split information and block size information, determining a differential quantization parameter of the current quantization group, determining a quantization parameter of the current quantization group based on the predicted quantization parameter and the differential quantization parameter of the current quantization group, and dequantizing a current block included in the current quantization group according to the quantization parameter of the current quantization group. Further, an image decoding apparatus including processing for performing the image decoding method is provided.

[0050] An image decoding method is provided, including matching a current block with a current quantization parameter unit based on at least one of a position and a size of the current block, obtaining a predicted quantization parameter for the current quantization parameter unit, obtaining a differential quantization parameter for the current quantization parameter unit, determining a quantization parameter of the current quantization parameter unit based on the predicted quantization parameter and the differential quantization parameter, and dequantizing the current block according to the quantization parameter of the current quantization parameter unit. Further, an image decoding apparatus including processing for performing the image decoding method is provided. DETAILED DESCRIPTION

[0051] The advantages and features of the embodiments and methods of accomplishing the same can be understood more readily by reference to the following examples and accompanying drawings. In this regard, the present disclosure may have different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be thorough and complete and will fully convey the concept of the present disclosure to those skilled in the art.

[0052] The terms used in the specification will be defined briefly, and the embodiments will be described in detail.

[0053] All terms used in the specification, including the descriptive or technical terms, should be interpreted as having a meaning that is apparent to one of ordinary skill in the art. However, the terms may have different meanings according to the intention of one of ordinary skill in the art, precedents, or the emergence of new technologies. Also, some of the terms can be arbitrarily selected by the applicant, and in this case, the meaning of the selected terms will be described in detail in the detailed description of the present disclosure. Therefore, the terms used in the present disclosure should not be interpreted only on the basis of their names but must be defined on the basis of the meanings of the terms along with the descriptions in the entire specification.

[0054] In the following specification, the singular forms include the plural forms unless the context clearly dictates otherwise.

[0055] When a part "includes" or "comprises" an element, unless there is a particular description contrary thereto, the part can further include other elements, in addition to the element. In the following description, the term such as "unit" indicates a software or hardware component such as a field programmable gate array (FPGA) or an application specific semiconductor (ASIC) and performs specific functions. However, the "unit" is not limited to software or hardware. The "unit" can be formed in an addressable storage medium or can be formed as an operation of one or more processors. Therefore, for example, the term "unit" can refer to a component such as a software component, an object-oriented software component, a class component, and a task component, and can include a process, a function, an attribute, a procedure, a subroutine, a segment of program code, a driver, firmware, a microcode, a circuit, data, a database, a data structure, a table, an array, or a variable. The functions provided by the components and "units" can be associated with a smaller number of components and "units" or can be divided into additional components and "units".

[0056] The term "current block" indicates one of a current coding unit, a prediction unit, and a transform unit to be encoded or decoded. For convenience of description, when it is necessary to distinguish between other types of blocks such as a prediction unit, a transform unit, etc., the terms "current coding block", "current prediction block", "current transform block" can be used. In addition, a "lower block" denotes a data unit divided from the "current block". An "upper block" denotes a data unit including the "current block".

[0057] Hereinafter, a "sample" denotes data assigned to a sampling position of an image, i.e., data to be processed. For example, pixel values of an image in a spatial domain and transform coefficients on a transform domain can be samples. A unit including at least one such sample can be defined as a block.

[0058] Hereinafter, the present disclosure will be described more fully with reference to the accompanying drawings, so that one of ordinary skill in the art can perform the embodiments without any difficulty. Also, in order to clearly describe the present disclosure, portions irrelevant to the description will be omitted in the drawings.

[0059] Figure 1 a is a block diagram of an image encoding apparatus 100 based on a coding unit according to a tree structure according to an embodiment of the present disclosure.

[0060] The image encoding apparatus 100 can include an encoder 110 and a bitstream generator 120.

[0061] The encoder 110 divides a picture or a slice included in the picture into a plurality of largest coding units according to the size of the largest coding unit. The largest coding unit can be a data unit having a size of 32x32, 64x64, 128x128, 256x256, etc., and can all be a square data unit having a width and a length of a power of 2. The encoder 110 can provide the bitstream generator 120 with largest coding unit size information indicating the size of the largest coding unit. The bitstream generator 120 can add the largest coding unit size information to the bitstream.

[0062] The encoder 110 determines a coding unit by dividing the largest coding unit. Whether to divide the coding unit is determined according to whether the division of the coding unit is efficient through rate-distortion optimization. In addition, division information indicating whether the coding unit is divided can be generated. The division information can be expressed in the form of a flag.

[0063] The coding unit can be divided in various ways. For example, a square coding unit can be divided into four square coding units having a width and a height that are half of the width and the height of the square coding unit. The square coding unit can be divided into two rectangular coding units having a width that is half of the width of the square coding unit. The square coding unit can be divided into two rectangular coding units having a height that is half of the height of the square coding unit. The square coding unit can be divided into three coding units by dividing the width or the height of the square coding unit in a ratio of 1:2:1.

[0064] A rectangular coding unit having a width that is twice a height can be divided into two square coding units. The rectangular coding unit having a width that is twice a height can be divided into two rectangular coding units having a width that is four times the height. The rectangular coding unit having a width that is twice a height can be divided into two rectangular coding units and one square coding unit by dividing the width of the rectangular coding unit in a ratio of 1:2:1.

[0065] Likewise, a rectangular coding unit having a height that is twice a width can be divided into two square coding units. The rectangular coding unit having a height that is twice a width can be divided into two rectangular coding units having a height that is four times the width. Likewise, the rectangular coding unit having a height that is twice a width can be divided into two rectangular coding units and one square coding unit by dividing the height of the rectangular coding unit in a ratio of 1:2:1.

[0066] When two or more partitioning methods are applicable to the image encoding apparatus 100, information about a partitioning method applicable to a coding unit can be determined for each picture among the partitioning methods applicable to the image encoding apparatus 100. Thus, only a specific partitioning method can be determined for each picture. When the image encoding apparatus 100 employs only one partitioning method, information about a partitioning method applicable to a coding unit is not additionally determined.

[0067] A coding unit of a specific size can be partitioned by using a specific partitioning method. For example, when the size of a coding unit is 256x256, the coding unit can be set to be partitioned only into four square coding units having a width and a height that is half of the coding unit.

[0068] When the partitioning information of a coding unit indicates that the coding unit is to be partitioned, partition shape information indicating a partitioning method of the coding unit can be generated. When there is only one partitioning method applicable to a picture to which the coding unit belongs, the partition shape information can not be generated. When the partitioning method is adaptively determined based on coding information about a vicinity of the coding unit, the partition shape information can not be generated.

[0069] As described above, the image data of a current picture is partitioned into a maximum coding unit according to a maximum size of a coding unit. The maximum coding unit can include coding units hierarchically partitioned from the maximum coding unit. The shape and position of a lower coding unit can be determined based on a partition shape of an upper coding unit. A minimum size of a coding unit that limits partitioning of a coding unit can be set in advance.

[0070] The encoder 110 compares the coding efficiency when a coding unit is hierarchically partitioned with the coding efficiency when the coding unit is not partitioned. Then, the encoder 110 determines whether to partition the coding unit according to the result of the comparison. When it is determined that partitioning the coding unit is more efficient, the encoder 110 hierarchically partitions the coding unit. When the result of the comparison reveals that it is efficient not to partition the coding unit, the coding unit is not partitioned. Whether to partition the coding unit can be determined independently of whether to partition other coding units adjacent to the coding unit.

[0071] A last partitioned coding unit can be predicted by intra prediction or inter prediction. Intra prediction is a method of predicting a sample of a prediction unit by using reference samples around the prediction unit. Inter prediction is a method of predicting a sample of a prediction unit by obtaining a reference sample from a reference picture to which a current picture refers.

[0072] For intra prediction, the encoder 110 can select the most efficient intra prediction method by applying a plurality of intra prediction methods to a prediction unit. The intra prediction methods include a DC mode, a planar mode, a directional mode such as a vertical mode and a horizontal mode, etc.

[0073] Intra prediction can be performed for each prediction unit when the reconstructed samples around the coding unit are used as reference samples. However, when the reconstructed samples in the coding unit are used as reference samples, the reference samples in the coding unit should be first reconstructed, and thus, the prediction order of the prediction units can depend on the transform order of the transform units. Therefore, when the reconstructed samples in the coding unit are used as reference samples, only the intra prediction method for the transform unit corresponding to the prediction unit is determined for the prediction unit, and the intra prediction can be substantially performed for each transform unit.

[0074] The encoder 110 can select the most efficient inter prediction method by determining the best motion vector and the reference picture. For inter prediction, the encoder 110 can determine a plurality of motion vector candidates in the coding units spatially and temporally adjacent to the current coding unit, and determine the most efficient motion vector as the motion vector among the plurality of motion vector candidates. Likewise, a plurality of reference picture candidates can be determined in the coding units spatially and temporally adjacent to the current coding unit, and the most efficient reference picture can be determined among the plurality of reference picture candidates. In an embodiment, the reference picture can be determined from a reference picture list determined in advance for the current picture. In an embodiment, for accurate prediction, the most efficient motion vector among the plurality of motion vector candidates can be determined as a predicted motion vector, and the motion vector can be determined by correcting the predicted motion vector. The inter prediction can be performed in parallel for each prediction unit included in the coding unit.

[0075] The encoder 110 can reconstruct the coding unit according to the skip mode by obtaining only information representing the motion vector and the reference picture. According to the skip mode, all coding information including the residual signal except for the information representing the motion vector and the reference picture is omitted. Because the residual signal is omitted, the skip mode is applicable when the accuracy of prediction is very high.

[0076] The partition mode to be used can be limited according to the prediction method for the prediction unit. For example, the partition mode for the prediction unit of the size of 2N×2N and N×N can be applied only to the intra prediction, while the partition mode for the prediction unit of the size of 2N×2N, 2N×N, N×2N, and N×N can be applied to the inter prediction. Further, the partition mode for the prediction unit of the size of 2N×2N can be applied only to the skip mode of the inter prediction. The partition mode allowed for each prediction method in the image encoding apparatus 100 can be changed according to the coding efficiency.

[0077] The image encoding apparatus 100 can perform a transform based on the coding unit. The image encoding apparatus 100 can perform a transform on residual data included in the coding unit through a pre-set process, where the residual data is a difference between an original value of a pixel and a predicted value thereof. For example, the image encoding apparatus 100 can perform a lossy compression on the residual data through quantization and a discrete cosine transform (DCT) / discrete sine transform (DST) transform. Alternatively, the image encoding apparatus 100 can perform a lossless compression on the residual data without quantization.

[0078] In summary, the encoder 110 determines the most efficient prediction method for the current coding unit from among a plurality of intra-prediction methods and inter-prediction methods. Then, the encoder 110 determines the prediction method for the current coding unit based on coding efficiency according to the result of the prediction. Likewise, the encoder 110 can determine the transform method based on coding efficiency according to the result of the transform. The coding efficiency of the coding unit is finally determined based on the most efficient prediction method and transform method determination scheme for the coding unit. The encoder 110 determines the hierarchical structure of the maximum coding unit according to the coding efficiency of the finally divided coding unit.

[0079] The encoder 110 can measure the coding efficiency of the coding unit, the prediction efficiency of the prediction method, etc. by using a rate-distortion optimization technique based on a Lagrangian multiplier.

[0080] The encoder 110 can generate division information indicating whether the coding unit is divided based on the determined hierarchical structure of the maximum coding unit. The encoder 110 can generate partition mode information for determining a prediction unit and transform unit division information for determining a transform unit with respect to the divided coding unit. When there are two or more division methods of the coding unit, the encoder 110 can generate division shape information indicating the division method along with the division information. Then, the encoder 110 can generate information about the prediction method and the transform method for the prediction unit and the transform unit.

[0081] The bitstream generator 120 can output the information generated by the encoder 110 in the form of a bitstream based on the hierarchical structure of the maximum coding unit.

[0082] Hereinafter, a method of determining a coding unit, a prediction unit, and a transform unit according to a tree structure of a maximum coding unit according to an embodiment will be described in detail with reference to the accompanying drawings. Figures 3 to 12 A method of determining a coding unit, a prediction unit, and a transform unit according to a tree structure of a maximum coding unit according to an embodiment will be described in detail with reference to the accompanying drawings.

[0083] Figure 1 b is a block diagram of an image decoding apparatus 150 based on a coding unit according to a tree structure according to an embodiment.

[0084] The image decoding apparatus 150 includes a receiver 160 and a decoder 170.

[0085] As described above with reference toFigure 1 a And the image encoding apparatus 100 describes various terms such as "coding unit", "prediction unit", "transform unit", and various "partition information" related to a decoding operation of the image decoding apparatus 150 according to an embodiment. Also, the image decoding apparatus 150 is configured to restore image data, and thus various encoding methods used in the image encoding apparatus 100 are applicable to the image decoding apparatus 150.

[0086] The receiver 160 receives and parses a bitstream of an encoded image. The receiver 160 extracts information required to decode each maximum coding unit from the parsed bitstream and provides the information to the decoder 170. The receiver 160 can extract information on a maximum size of a coding unit of a current picture from a header for the current picture, a sequence parameter set, or a picture parameter set.

[0087] The receiver 160 extracts, from the parsed bitstream, partition information of a coding unit of a tree structure for each maximum coding unit. The extracted partition information is output to the decoder 170. The decoder 170 can determine a tree structure of a maximum coding unit by partitioning the maximum coding unit according to the extracted partition information.

[0088] The partition information extracted by the decoder 170 is partition information of a tree structure determined by the image encoding apparatus 100 in order to generate a minimum coding error. Thus, the image decoding apparatus 150 can reconstruct an image by decoding data according to an encoding method that generates a minimum coding error.

[0089] The decoder 170 can extract partition information on data units such as prediction units and transform units included in a coding unit. For example, the decoder 170 can extract information on a most efficient partition mode for a prediction unit. The decoder 170 can extract transform partition information of a most efficient tree structure in a transform unit.

[0090] The decoder 170 can obtain information on a most efficient prediction method in a prediction unit partitioned from a coding unit. The decoder 170 can obtain information on a most efficient transform method in a transform unit partitioned from a coding unit.

[0091] The decoder 170 extracts information from a bitstream according to a method by which the bitstream is configured by the bitstream generator 120 of the image encoding apparatus 100.

[0092] The decoder 170 can partition a maximum coding unit into coding units of a most efficient tree structure based on the partition information. The decoder 170 can partition a coding unit into prediction units according to information on a partition mode. The decoder 170 can partition a coding unit into transform units according to transform partition information.

[0093] The decoder 170 can predict the prediction unit according to the information about the prediction method. The decoder 170 can perform inverse quantization and inverse transformation on the residual data corresponding to the difference between the original value of the pixel and the predicted value, based on the information about the method of transforming the transform unit. In addition, the decoder 170 can reconstruct the pixels of the coding unit according to the result of predicting the prediction unit and the result of transforming the transform unit.

[0094] Figure 2 It is shown that the image decoding apparatus 150 determines at least one coding unit by dividing the current coding unit according to an embodiment.

[0095] According to an embodiment, the image decoding apparatus 150 can determine the shape of the coding unit by using the block shape information, and can determine the shape into which the coding unit is to be divided by using the division shape information. That is, the method of dividing the coding unit indicated by the division shape information can be determined based on the block shape indicated by the block shape information employed by the image decoding apparatus 150.

[0096] According to an embodiment, the image decoding apparatus 150 can use the block shape information indicating that the current coding unit has a square shape. For example, the image decoding apparatus 150 can determine whether to not divide the square coding unit, whether to vertically divide the square coding unit, whether to horizontally divide the square coding unit, or whether to divide the square coding unit into four coding units, based on the division shape information. Referring to Figure 2 When the block shape information of the current coding unit 200 indicates a square shape, the decoder 170 can determine not to divide the coding unit 210a having the same size as the current coding unit 200 based on the division shape information indicating that no division is performed, or can determine the coding units 210b, 210c, or 210d divided based on the division shape information indicating a predetermined division method.

[0097] Referring to Figure 2 According to an embodiment, the image decoding apparatus 150 can determine two coding units 210b obtained by dividing the current coding unit 200 in the vertical direction, based on the division shape information indicating that the division is performed in the vertical direction. The image decoding apparatus 150 can determine two coding units 210c obtained by dividing the current coding unit 200 in the horizontal direction, based on the division shape information indicating that the division is performed in the horizontal direction. The image decoding apparatus 150 can determine four coding units 210d obtained by dividing the current coding unit 300 in the vertical and horizontal directions, based on the division shape information indicating that the division is performed in the vertical and horizontal directions. However, the division method of the square coding unit is not limited to the above-described methods, and the division shape information can indicate various methods. The predetermined division method of dividing the square coding unit will be described in detail with respect to various embodiments below.

[0098] Figure 3 A process of determining at least one coding unit by partitioning a non-square coding unit according to an embodiment, which is performed by the image decoding apparatus 150, is illustrated.

[0099] According to an embodiment, the image decoding apparatus 150 can use block shape information indicating that the current coding unit has a non-square shape. The image decoding apparatus 150 can determine whether to not partition the non-square current coding unit or to partition the non-square current coding unit by using a predetermined partitioning method based on the partitioning shape information. Referring to Figure 3 When the block shape information of the current coding unit 300 or 350 indicates a non-square shape, the image decoding apparatus 150 can determine that the coding unit 310 or 360 having the same size as the current coding unit 300 or 350 is not partitioned based on the partitioning shape information indicating that no partitioning is performed, or determine the coding units 320a and 320b, 330a to 330c, 370a and 370b, or 380a to 380c partitioned based on the partitioning shape information indicating the predetermined partitioning method. The predetermined partitioning method of partitioning a non-square coding unit will be described in detail with respect to various embodiments below.

[0100] According to an embodiment, the image decoding apparatus 150 can determine a partitioning method of a coding unit by using the partitioning shape information, and in this case, the partitioning shape information can indicate the number of one or more coding units generated by partitioning the coding unit. Referring to Figure 3 When the partitioning shape information indicates that the current coding unit 300 or 350 is partitioned into two coding units, the image decoding apparatus 150 can determine the two coding units 320a and 320b or 370a and 370b included in the current coding unit 300 or 350 by partitioning the current coding unit 300 or 350 based on the partitioning shape information.

[0101] According to an embodiment, when the image decoding apparatus 150 partitions the non-square current coding unit 300 or 350 based on the partitioning shape information, the current coding unit can be partitioned considering the position of the long side of the non-square current coding unit 300 or 350. For example, the image decoding apparatus 150 can determine a plurality of coding units by partitioning the long side of the current coding unit 300 or 350 considering the shape of the current coding unit 300 or 350.

[0102] According to an embodiment, when the split shape information indicates that the current coding unit 300 or 350 is split into an odd number of blocks, the image decoding apparatus 150 can determine the odd number of coding units included in the current coding unit 300 or 350. For example, when the split shape information indicates that the current coding unit 300 or 350 is split into three coding units, the image decoding apparatus 150 can split the current coding unit 300 or 350 into three coding units 330a, 330b, and 330c or 380a, 380b, and 380c. According to an embodiment, the image decoding apparatus 150 can determine the odd number of coding units included in the current coding unit 300 or 350, and not all of the determined coding units can have the same size. For example, the size of a predetermined coding unit 330b or 380b among the determined odd number of coding units 330a, 330b, and 330c or 380a, 380b, and 380c can be different from the sizes of the other coding units 330a and 330c or 380a and 380c. That is, the coding units that can be determined by splitting the current coding unit 300 or 350 can have various sizes, and in some cases, all of the odd number of coding units 330a, 330b, and 330c or 380a, 380b, and 380c can have different sizes.

[0103] According to an embodiment, when the split shape information indicates that the current coding unit 300 or 350 is split into an odd number of blocks, the image decoding apparatus 150 can determine the odd number of coding units included in the current coding unit 300 or 350, and can apply a predetermined restriction to at least one of the odd number of coding units generated by splitting the current coding unit 300 or 350. Referring to Figure 3 , the image decoding apparatus 150 can allow a decoding method of a coding unit 330b or 380b at a center position among the three coding units 330a, 330b, and 330c or 380a, 380b, and 380c generated by splitting the current coding unit 300 or 350 to be different from decoding methods of the other coding units 330a and 330c or 380a and 380c. For example, unlike the other coding units 330a and 330c or 380a and 380c, the image decoding apparatus 150 can restrict the coding unit 330b or 380b at the center position not to be split any more or to be split only a predetermined number of times.

[0104] Figure 4 A process of splitting a coding unit based on at least one of block shape information and split shape information, performed by the image decoding apparatus 150 according to an embodiment, is illustrated.

[0105] According to an embodiment, the image decoding device 150 can determine whether to divide the square first coding unit 400 into coding units or not to divide the square first coding unit 400 based on at least one of block shape information and partition shape information. According to an embodiment, when the partition shape information indicates that the first coding unit 400 is divided in the horizontal direction, the image decoding device 150 can determine the second coding unit 410 by dividing the first coding unit 400 in the horizontal direction. The terms first coding unit, second coding unit, and third coding unit used in the embodiment are terms used to understand the relationship before and after the division of coding units. For example, the second coding unit can be determined by dividing the first coding unit, and the third coding unit can be determined by dividing the second coding unit. It will be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit follows the above description.

[0106] According to an embodiment, the image decoding device 150 may determine, based on at least one of block shape information and partition shape information, whether to divide the determined second coding unit 410 into coding units or not to divide the determined second coding unit 410. (Refer to...) Figure 4 The image decoding device 150 may, based on at least one of block shape information and partition shape information, divide a non-square second coding unit 410 determined by dividing the first coding unit 400 into one or more third coding units 420a, or 420b, 420c, and 420d. The image decoding device 150 may obtain at least one of block shape information and partition shape information, and may determine a plurality of second coding units (e.g., 410) of various shapes by dividing the first coding unit 400 based on at least one of the obtained block shape information and partition shape information. Furthermore, it may divide the second coding unit 410 based on at least one of the block shape information and partition shape information using the partitioning method of the first coding unit 400. According to an embodiment, when the first coding unit 400 is divided into a second coding unit 410 based on at least one of the block shape information and partition shape information of the first coding unit 400, the second coding unit 410 may also be divided into third coding units 420a, or 420b, 420c, and 420d based on at least one of the block shape information and partition shape information of the second coding unit 410. In other words, coding units can be recursively partitioned based on at least one of block shape information and partition shape information for each coding unit. Methods for recursively partitioning coding units will be described below with respect to various embodiments.

[0107] According to an embodiment, the image decoding apparatus 150 can determine whether to divide each of the third coding units 420a, or 420b, 420c, and 420d, into coding units or not to divide the second coding unit 410 based on at least one of the block shape information and the division shape information. According to an embodiment, the image decoding apparatus 150 can divide the non-square second coding unit 410 into an odd number of third coding units 420b, 420c, and 420d. The image decoding apparatus 150 can apply a preset restriction to a preset third coding unit among the odd number of third coding units 420b, 420c, and 420d. For example, the image decoding apparatus 150 can restrict the third coding unit 420c at a center position among the odd number of third coding units 420b, 420c, and 420d to not be divided any more or to be divided a settable number of times. Referring to Figure 4 , the image decoding apparatus 150 can restrict the third coding unit 420c at a center position among the odd number of third coding units 420b, 420c, and 420d included in the non-square second coding unit 410 to not be divided any more, to be divided by using a preset division method (e.g., to be divided into only four coding units or to be divided by using a division method of the second coding unit 410), or to be divided only a preset number of times (e.g., to be divided only n times (where n > 0)). However, the restriction on the third coding unit 420c at the center position is not limited to the above-described example and can include various restrictions for decoding the third coding unit 420c at the center position differently from the other third coding units 420b and 420d.

[0108] According to an embodiment, the image decoding apparatus 150 can obtain at least one of the block shape information and the division shape information for dividing the current coding unit from a preset position in the current coding unit.

[0109] According to an embodiment, when the current coding unit is divided into a preset number of coding units, the image decoding apparatus 150 can select one of the coding units. As will be described below with respect to various embodiments, various methods can be used to select one of the plurality of coding units.

[0110] According to an embodiment, the image decoding apparatus 150 can divide the current coding unit into a plurality of coding units and can determine a coding unit at a preset position.

[0111] Figure 5 A method of determining a coding unit at a preset position among an odd number of coding units by the image decoding apparatus 150 according to an embodiment is illustrated.

[0112] According to an embodiment, the image decoding apparatus 150 can use information indicating a position of the odd number of coding units to determine a coding unit at a center position among the odd number of coding units. Referring toFigure 5 The image decoding apparatus 150 can determine the odd-numbered coding units 520a, 520b, and 520c by dividing the current coding unit 500. The image decoding apparatus 150 can determine the coding unit 520b at the center position by using information about positions of the odd-numbered coding units 520a, 520b, and 520c. For example, the image decoding apparatus 150 can determine the coding unit 520b at the center position by determining positions of the coding units 520a, 520b, and 520c based on information indicating positions of preset samples included in the coding units 520a, 520b, and 520c. In detail, the image decoding apparatus 150 can determine the coding unit 520b at the center position by determining positions of the coding units 520a, 520b, and 520c based on information indicating positions of top-left samples 530a, 530b, and 530c of the coding units 520a, 520b, and 520c, respectively.

[0113] According to an embodiment, the information indicating the positions of the top-left samples 530a, 530b, and 530c included in the coding units 520a, 520b, and 520c, respectively, can include information about positions or coordinates of the coding units 520a, 520b, and 520c in a picture. According to an embodiment, the information indicating the positions of the top-left samples 530a, 530b, and 530c included in the coding units 520a, 520b, and 520c, respectively, can include information indicating widths or heights of the coding units 520a, 520b, and 520c included in the current coding unit 500, and the widths or heights can correspond to information indicating differences between coordinates of the coding units 520a, 520b, and 520c in the picture. That is, the image decoding apparatus 150 can determine the coding unit 520b at the center position by directly using information about positions or coordinates of the coding units 520a, 520b, and 520c in the picture or by using information about widths or heights of the coding units corresponding to differences between the coordinates.

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

[0115] According to an embodiment, the image decoding apparatus 150 can divide the current coding unit 500 into a plurality of coding units 520a, 520b, and 520c, and can select one of the coding units 520a, 520b, and 520c based on a predetermined criterion. For example, the image decoding apparatus 150 can select the coding unit 520b having a size different from the sizes of the other coding units from among the coding units 520a, 520b, and 520c.

[0116] According to an embodiment, the image decoding apparatus 150 can determine the width or height of the upper coding unit 520a, the middle coding unit 520b, and the lower coding unit 520c by using a coordinate (xa, ya) indicating the position of the top-left sample 530a of the upper coding unit 520a, a coordinate (xb, yb) indicating the position of the top-left sample 530b of the middle coding unit 520b, and a coordinate (xc, yc) indicating the position of the top-left sample 530c of the lower coding unit 520c. The image decoding apparatus 150 can determine the size of each of the coding units 520a, 520b, and 520c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 520a, 520b, and 520c.

[0117] According to an embodiment, the image decoding apparatus 150 can determine the width of the upper coding unit 520a as xb-xa and the height thereof as yb-ya. According to an embodiment, the image decoding apparatus 150 can determine the width of the middle coding unit 520b as xc-xb and the height thereof as yc-yb. According to an embodiment, the image decoding apparatus 150 can determine the width or height of the lower coding unit 520c by using the width or height of the current coding unit 500 or the width or height of the upper coding unit 520a and the middle coding unit 520b. The image decoding apparatus 150 can determine a coding unit having a size different from those of other coding units based on the determined widths and heights of the coding units 520a, 520b, and 520c. Referring to Figure 5 , the image decoding apparatus 150 can determine the middle coding unit 520b having a size different from those of the upper coding unit 520a and the lower coding unit 520c as a coding unit at a preset position. However, the above-described method of determining a coding unit having a size different from those of other coding units performed by the image decoding apparatus 150 corresponds to only an example of determining a coding unit at a preset position by using the sizes of coding units determined based on coordinates of samples, and thus various methods of determining a coding unit at a preset position by comparing the sizes of coding units determined based on coordinates of preset samples can be used.

[0118] However, the positions of samples considered in determining the positions of coding units are not limited to the above-described top-left positions, and information on arbitrary positions of samples included in a coding unit can be used.

[0119] According to an embodiment, the image decoding apparatus 150 can select a coding unit at a preset position from among the odd-numbered coding units determined by partitioning the current coding unit, considering a shape of the current coding unit. For example, when the current coding unit has a non-square shape with a width greater than a height, the image decoding apparatus 150 can determine a coding unit at a preset position in a horizontal direction. That is, the image decoding apparatus 150 can determine one of the coding units at different positions in the horizontal direction and impose a restriction on the coding unit. When the current coding unit has a non-square shape with a height greater than a width, the image decoding apparatus 150 can determine a coding unit at a preset position in a vertical direction. That is, the image decoding apparatus 150 can determine one of the coding units at different positions in the vertical direction and can impose a restriction on the coding unit.

[0120] According to an embodiment, the image decoding apparatus 150 can use information indicating respective positions of the even-numbered coding units to determine a coding unit at a preset position among the even-numbered coding units. The image decoding apparatus 150 can determine the even-numbered coding units by partitioning the current coding unit, and can determine a coding unit at a preset position by using information about positions of the even-numbered coding units. Operations related thereto can correspond to the operations of determining a coding unit at a preset position (e.g., a center position) among the odd-numbered coding units that have been described in detail above, and thus a detailed description thereof is not provided here. Figure 5 The operations of determining a coding unit at a preset position (e.g., a center position) among the odd-numbered coding units that have been described in detail above correspond, and thus a detailed description thereof is not provided here.

[0121] According to an embodiment, when a current coding unit that is not square is partitioned into a plurality of coding units, a coding unit at a preset position among the plurality of coding units can be determined using preset information about the coding unit at the preset position in a partitioning operation. For example, the image decoding apparatus 150 can determine a coding unit at a center position among the plurality of coding units determined by partitioning the current coding unit using at least one of block shape information and partition shape information stored in samples included in the coding unit at the center position in the partitioning operation.

[0122] Referring to Figure 5, the image decoding apparatus 150 can divide the current coding unit 500 into a plurality of coding units 520a, 520b, and 520c based on at least one of the block shape information and the division shape information, and can determine the coding unit 520b at the center position among the plurality of coding units 520a, 520b, and 520c. Also, the image decoding apparatus 150 can determine the coding unit 520b at the center position in consideration of a position at which at least one of the block shape information and the division shape information is obtained. That is, at least one of the block shape information and the division shape information of the current coding unit 500 can be obtained from the sample 540 at the center position of the current coding unit 500, and when the current coding unit 500 is divided into a plurality of coding units 520a, 520b, and 520c based on at least one of the block shape information and the division shape information, the coding unit 520b including the sample 540 can be determined as the coding unit at the center position. However, information used to determine the coding unit at the center position is not limited to at least one of the block shape information and the division shape information, and the coding unit at the center position can be determined using various types of information.

[0123] According to an embodiment, the preset information used to identify the coding unit at the preset position can be obtained from a preset sample included in the coding unit to be determined. Referring to Figure 5 , the image decoding apparatus 150 can determine the coding unit at the preset position (e.g., the coding unit at the center position among the divided plurality of coding units) among the plurality of coding units 520a, 520b, and 520c determined by dividing the current coding unit 500 using at least one of the block shape information and the division shape information obtained from the sample at the preset position in the current coding unit 500 (e.g., the sample at the center position of the current coding unit 500). That is, the image decoding apparatus 150 can determine the sample at the preset position by considering the block shape of the current coding unit 500, determine the coding unit 520b including the sample from which the preset information (e.g., at least one of the block shape information and the division shape information) can be obtained, from among the plurality of coding units 520a, 520b, and 520c determined by dividing the current coding unit 500, and can apply the preset restriction to the coding unit 520b. Referring to Figure 5 , according to an embodiment, in the decoding operation, the image decoding apparatus 150 can determine the sample 540 at the center position of the current coding unit 500 as the sample from which the preset information can be obtained, and can apply the preset restriction to the coding unit 520b including the sample 540. However, the position of the sample from which the preset information can be obtained is not limited to the above-described position, and can include any position included in the coding unit 520b to be determined as the sample for the restriction.

[0124] According to an embodiment, the image decoding apparatus 150 can determine the position of the sample from which the preset information is obtainable based on the shape of the current coding unit 500. According to an embodiment, the block shape information can indicate whether the current coding unit has a square shape or a non-square shape, and the position of the sample from which the preset information is obtainable can be determined based on the shape. For example, the image decoding apparatus 150 can determine a sample located on a boundary for equally dividing at least one of a width and a height of the current coding unit as a sample from which the preset information is obtainable by using at least one of information about the width of the current coding unit and information about the height of the current coding unit. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding apparatus 150 can determine one of samples adjacent to a boundary for equally dividing a long side of the current coding unit as a sample from which the preset information is obtainable.

[0125] According to an embodiment, when the current coding unit is divided into a plurality of coding units, the image decoding apparatus 150 can determine a coding unit at a preset position among the plurality of coding units using at least one of the block shape information and the division shape information. According to an embodiment, the image decoding apparatus 150 can obtain at least one of the block shape information and the division shape information from a sample at the preset position in the coding unit, and can divide the plurality of coding units generated by dividing the current coding unit by using at least one of the division shape information and the block shape information, wherein the at least one of the division shape information and the block shape information is obtained from the sample at the preset position in each of the plurality of coding units. That is, the coding units can be recursively divided based on at least one of the block shape information and the division shape information, wherein the at least one of the block shape information and the division shape information is obtained from the sample at the preset position in each of the coding units. The operation of recursively dividing the coding units has been described above with respect to FIGS. 2 to 4, and thus a detailed description thereof will not be provided here. Figure 4 The operation of recursively dividing the coding units has been described above with respect to FIGS. 2 to 4, and thus a detailed description thereof will not be provided here.

[0126] According to an embodiment, the image decoding apparatus 150 can determine one or more coding units by dividing the current coding unit, and can determine an order in which the one or more coding units are decoded based on a preset block (e.g., the current coding unit).

[0127] Figure 6 An order in which the image decoding apparatus 150 processes a plurality of coding units when the image decoding apparatus 150 determines the plurality of coding units by dividing a current coding unit is shown according to an embodiment.

[0128] According to an embodiment, the image decoding apparatus 150 can determine the second coding units 610a and 610b by dividing the first coding unit 600 in a vertical direction based on the block shape information and the division shape information, can determine the second coding units 630a and 630b by dividing the first coding unit 600 in a horizontal direction, or can determine the second coding units 650a, 650b, 650c, and 650d by dividing the first coding unit 600 in the vertical direction and the horizontal direction.

[0129] Referring to Figure 6 , the image decoding apparatus 150 can determine to process the second coding units 610a and 610b determined by dividing the first coding unit 600 in the vertical direction in a horizontal direction order 610c. The image decoding apparatus 150 can determine to process the second coding units 630a and 630b determined by dividing the first coding unit 600 in the horizontal direction in a vertical direction order 630c. The image decoding apparatus 150 can determine to process the second coding units 650a, 650b, 650c, and 650d determined by dividing the first coding unit 600 in the vertical direction and the horizontal direction according to a predetermined order (e.g., a raster scan order or a zigzag scan order 650e), in which coding units in one row are processed and then coding units in a next row are processed.

[0130] According to an embodiment, the image decoding apparatus 150 can recursively divide coding units. Referring to Figure 6 , the image decoding apparatus 150 can determine a plurality of coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d by dividing the first coding unit 600, and can recursively divide each of the determined plurality of coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d. The division method of the plurality of coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d can correspond to the division method of the first coding unit 600. As such, each of the plurality of coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d can be independently divided into a plurality of coding units. Referring to Figure 6 , the image decoding apparatus 150 can determine the second coding units 610a and 610b by dividing the first coding unit 600 in the vertical direction, and can determine to independently divide or not to divide each of the second coding units 610a and 610b.

[0131] According to an embodiment, the image decoding apparatus 150 can determine the third coding units 620a and 620b by dividing the left second coding unit 610a in the horizontal direction, and can not divide the right second coding unit 610b.

[0132] According to an embodiment, the processing order of coding units can be determined based on the operation of dividing the coding units. In other words, the processing order of divided coding units can be determined based on the processing order of the coding unit immediately before being divided. The image decoding apparatus 150 can determine the processing order of the third coding units 620a and 620b determined by dividing the left second coding unit 610a independently of the right second coding unit 610b. Because the third coding units 620a and 620b are determined by dividing the left second coding unit 610a in the horizontal direction, the third coding units 620a and 620b can be processed in the vertical direction order 620c. Because the left second coding unit 610a and the right second coding unit 610b are processed in the horizontal direction order 610c, the right second coding unit 610b can be processed after the third coding units 620a and 620b included in the left second coding unit 610a are processed in the vertical direction order 620c. The operation of determining the processing order of coding units based on the coding unit before being divided is not limited to the above-described example, and various methods can be used to independently process coding units divided and determined to be various shapes in a preset order.

[0133] Figure 7 A process in which the image decoding apparatus 150 determines that a current coding unit is to be divided into an odd number of coding units when the coding units cannot be processed in a preset order according to an embodiment is shown.

[0134] According to an embodiment, the image decoding apparatus 150 can determine whether a current coding unit is to be divided into an odd number of coding units based on the obtained block shape information and the division shape mode information. Referring to Figure 7 , the square first coding unit 700 can be divided into the non-square second coding units 710a and 710b, and the second coding units 710a and 710b can be independently divided into the third coding units 720a and 720b and 720c to 720e. According to an embodiment, the image decoding apparatus 150 can determine the plurality of third coding units 720a and 720b by dividing the left second coding unit 710a in the horizontal direction, and can divide the right second coding unit 710b into an odd number of third coding units 720c to 720e.

[0135] According to an embodiment, the image decoding apparatus 150 can determine whether an arbitrary coding unit is to be divided into an odd number of coding units by determining whether the third coding units 720a and 720b and 720c through 720e can be processed in a predetermined order. Referring to Figure 7 , the image decoding apparatus 150 can determine the third coding units 720a and 720b and 720c through 720e by recursively dividing the first coding unit 700. The image decoding apparatus 150 can determine whether an arbitrary one of the following coding units is to be divided into an odd number of coding units based on at least one of the block shape information and the division shape information: the first coding unit 700, the second coding units 710a and 710b, and the third coding units 720a and 720b and 720c, 720d and 720e. For example, the right second coding unit among the second coding units 710a and 710b can be divided into an odd number of third coding units 720c, 720d and 720e. The processing order of the plurality of coding units included in the first coding unit 700 can be a predetermined order (e.g., the zigzag scan order 730), and the image decoding apparatus 150 can determine whether the third coding units 720c, 720d and 720e determined by dividing the right second coding unit 710b into an odd number of coding units satisfy a condition for being processed in the predetermined order.

[0136] According to an embodiment, the image decoding apparatus 150 can determine whether the third coding units 720a and 720b and 720c, 720d and 720e included in the first coding unit 700 satisfy a condition for being processed in a predetermined order, and the condition relates to whether at least one of the width and the height of the second coding units 710a and 710b is to be halved along the boundaries of the third coding units 720a and 720b and 720c, 720d and 720e. For example, the third coding units 720a and 720b determined by halving the height of the left second coding unit 710a, which is not a square, satisfy the condition. However, since the boundaries of the third coding units 720c, 720d and 720e determined by dividing the right second coding unit 710b into three coding units do not halve the width or the height of the right second coding unit 710b, it can be determined that the third coding units 720c, 720d and 720e do not satisfy the condition. When the condition is not satisfied as described above, the image decoding apparatus 150 can determine that the scan order is discontinuous, and determine, based on the determination result, that the right second coding unit 710b is to be divided into an odd number of coding units. According to an embodiment, when a coding unit is divided into an odd number of coding units, the image decoding apparatus 150 can impose a predetermined restriction on a coding unit at a predetermined position among the divided coding units. The restriction or the predetermined position has been described above with respect to various embodiments, and thus a detailed description thereof will not be provided here.

[0137] Figure 8 The process of determining at least one coding unit by partitioning the first coding unit 800 performed by the image decoding apparatus 150 according to an embodiment is illustrated. According to an embodiment, the image decoding apparatus 150 can partition the first coding unit 800 based on at least one of the block shape information and the partition shape information obtained by the receiver 160. The square first coding unit 800 can be partitioned into four square coding units, or can be partitioned into a plurality of non-square coding units. For example, referring to Figure 8 When the block shape information indicates that the first coding unit 800 has a square shape and the partition shape information indicates that the first coding unit 800 is partitioned into non-square coding units, the image decoding apparatus 150 can partition the first coding unit 800 into a plurality of non-square coding units. In detail, when the partition shape information indicates that an odd number of coding units are determined by partitioning the first coding unit 800 in a horizontal direction or a vertical direction, the image decoding apparatus 150 can partition the square first coding unit 800 into the odd number of coding units (e.g., the second coding units 810a, 810b, and 810c determined by partitioning the square first coding unit 800 in a vertical direction, or the second coding units 820a, 820b, and 820c determined by partitioning the square first coding unit 800 in a horizontal direction).

[0138] According to an embodiment, the image decoding apparatus 150 can determine whether the second coding units 810a, 810b, 810c, 820a, 820b, and 820c included in the first coding unit 800 satisfy a condition for processing in a preset order, and the condition is related to whether at least one of the width and the height of the first coding unit 800 is to be halved along the boundaries of the second coding units 810a, 810b, 810c, 820a, 820b, and 820c. Referring to Figure 8Because the boundaries of the second encoding units 810a, 810b, and 810c determined by dividing the first encoding unit 800, which is a square, in the vertical direction do not divide the width of the first encoding unit 800 in half, it can be determined that the first encoding unit 800 does not satisfy the condition for processing in the preset order. Also, because the boundaries of the second encoding units 820a, 820b, and 820c determined by dividing the first encoding unit 800, which is a square, in the horizontal direction do not divide the height of the first encoding unit 800 in half, it can be determined that the first encoding unit 800 does not satisfy the condition for processing in the preset order. When the condition is not satisfied as described above, the image decoding apparatus 150 can determine that the scan order is discontinuous, and can determine, based on the determination result, that the first encoding unit 800 is to be divided into an odd number of encoding units. According to an embodiment, when an encoding unit is divided into an odd number of encoding units, the image decoding apparatus 150 can apply a preset restriction to an encoding unit at a preset position among the divided encoding units. The restriction or the preset position has been described above with respect to various embodiments, and thus a detailed description thereof will not be provided here.

[0139] According to an embodiment, the image decoding apparatus 150 can determine various shapes of encoding units by dividing a first encoding unit.

[0140] Referring to Figure 8 , the image decoding apparatus 150 can divide a first encoding unit 800, which is a square, or a first encoding unit 830 or 850, which is not a square, into various shapes of encoding units.

[0141] Figure 9 It is shown that, according to an embodiment, when a second encoding unit having a non-square shape determined by dividing a first encoding unit 900 satisfies a preset condition, the image decoding apparatus 150 can limit the shape into which the second encoding unit is divided.

[0142] According to an embodiment, the image decoding apparatus 150 can determine to divide the first coding unit 900, which is a square, into second coding units 910a, 910b, 920a, and 920b, which are not squares, based on at least one of the block shape information and the division shape information obtained by the receiver 160. The second coding units 910a, 910b, 920a, and 920b can be independently divided. As such, the image decoding apparatus 150 can determine to divide each of the second coding units 910a, 910b, 920a, and 920b into a plurality of coding units or not to divide each of the second coding units 910a, 910b, 920a, and 920b based on at least one of the block shape information and the division shape information of each of the second coding units 910a, 910b, 920a, and 920b. According to an embodiment, the image decoding apparatus 150 can determine third coding units 912a and 912b by dividing a left second coding unit 910a, which is not square determined by dividing the first coding unit 900 in a vertical direction, in a horizontal direction. However, when the left second coding unit 910a is divided in the horizontal direction, the image decoding apparatus 150 can restrict a right second coding unit 910b not to be divided in the horizontal direction in which the left second coding unit 910a is divided. When third coding units 914a and 914b are determined by dividing the right second coding unit 910b in the same direction, because the left second coding unit 910a and the right second coding unit 910b are independently divided in the horizontal direction, the third coding units 912a, 912b, 914a, and 914b can be determined. However, this case acts identically to a case in which the image decoding apparatus 150 divides the first coding unit 900 into four second coding units 930a, 930b, 930c, and 930d, which are squares, based on at least one of the block shape information and the division shape information, and can be inefficient in terms of image decoding.

[0143] According to an embodiment, the image decoding apparatus 150 can determine third coding units 922a, 922b, 924a, and 924b by dividing a second coding unit 920a or 920b, which is not square determined by dividing the first coding unit 900 in a horizontal direction, in a vertical direction. However, when a second coding unit (e.g., an upper second coding unit 920a) is divided in the vertical direction, the image decoding apparatus 150 can restrict another second coding unit (e.g., a lower second coding unit 920b) not to be divided in the vertical direction in which the upper second coding unit 920a is divided for the above-described reason.

[0144] Figure 10A process of dividing a square coding unit when the division shape information indicates that the square coding unit will not be divided into four square coding units, performed by the image decoding apparatus 150 according to an embodiment, is shown.

[0145] According to an embodiment, the image decoding apparatus 150 can determine the second coding units 1010a, 1010b, 1020a, 1020b, etc. by dividing the first coding unit 1000 based on at least one of the block shape information and the division shape information. The division shape information can include information on various methods of dividing coding units, but information on various division methods can not include information for dividing a coding unit into four square coding units. According to such division shape information, the image decoding apparatus 150 can not divide the square first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d. The image decoding apparatus 150 can determine the non-square second coding units 1010a, 1010b, 1020a, 1020b, etc. based on the division shape information.

[0146] According to an embodiment, the image decoding apparatus 150 can independently divide the non-square second coding units 1010a, 1010b, 1020a, 1020b, etc. Each of the second coding units 1010a, 1010b, 1020a, 1020b, etc. can be recursively divided in a preset order, and the division method can correspond to a method of dividing the first coding unit 1000 based on at least one of the block shape information and the division shape information.

[0147] For example, the image decoding apparatus 150 can determine the square third coding units 1012a and 1012b by dividing the left second coding unit 1010a in a horizontal direction, and can determine the square third coding units 1014a and 1014b by dividing the right second coding unit 1010b in a horizontal direction. Also, the image decoding apparatus 150 can determine the square third coding units 1016a, 1016b, 1016c, and 1016d by dividing both the left second coding unit 1010a and the right second coding unit 1010b in a horizontal direction. In this case, coding units having the same shape as the four square second coding units 1030a, 1030b, 1030c, and 1030d divided from the first coding unit 1000 can be determined.

[0148] As another example, the image decoding apparatus 150 can determine square third coding units 1022a and 1022b by dividing the upper second coding unit 1020a in the vertical direction, and can determine square third coding units 1024a and 1024b by dividing the lower second coding unit 1020b in the vertical direction. Also, the image decoding apparatus 150 can determine square third coding units 1022a, 1022b, 1024a, and 1024b by dividing both the upper second coding unit 1020a and the lower second coding unit 1020b in the vertical direction. In this case, coding units having the same shape as the four square second coding units 1030a, 1030b, 1030c, and 1030d divided from the first coding unit 1000 can be determined.

[0149] Figure 11 It is shown that the processing order between a plurality of coding units can be changed according to a process of dividing a coding unit according to an embodiment.

[0150] According to an embodiment, the image decoding apparatus 150 can divide the first coding unit 1100 based on the block shape information and the division shape information. When the block shape information indicates a square shape and the division shape information indicates that the first coding unit 1100 is divided in at least one of a horizontal direction and a vertical direction, the image decoding apparatus 150 can determine second coding units 1110a, 1110b, 1120a, and 1120b by dividing the first coding unit 1100. Referring to Figure 11 The non-square second coding units 1110a, 1110b, 1120a, and 1120b determined by dividing the first coding unit 1100 only in the horizontal direction or the vertical direction can be independently divided based on the block shape information and the division shape information of each coding unit. For example, the image decoding apparatus 150 can determine third coding units 1116a, 1116b, 1116c, and 1116d by dividing the second coding units 1110a and 1110b generated by dividing the first coding unit 1100 in the vertical direction in the horizontal direction, and can determine third coding units 1126a, 1126b, 1126c, and 1126d by dividing the second coding units 1120a and 1120b generated by dividing the first coding unit 1100 in the horizontal direction in the vertical direction. The operation of dividing the second coding units 1110a, 1110b, 1120a, and 1120b has been described above with respect to Figure 9 Therefore, a detailed description thereof will not be provided here.

[0151] According to an embodiment, the image decoding apparatus 150 can process coding units in a predetermined order. The operation of processing coding units in a predetermined order has been described above with respect to Figure 6The operation of processing the coding units in the preset order is described, and thus detailed description thereof will not be provided here. Referring to Figure 11 The image decoding apparatus 150 can determine the four square third coding units 1116a, 1116b, 1116c, and 1116d and 1126a, 1126b, 1126c, and 1126d by dividing the square first coding unit 1100. According to an embodiment, the image decoding apparatus 150 can determine a processing order of the third coding units 1116a, 1116b, 1116c, and 1116d and 1126a, 1126b, 1126c, and 1126d based on a division method of the first coding unit 1100.

[0152] According to an embodiment, the image decoding apparatus 150 can determine the third coding units 1116a, 1116b, 1116c, and 1116d by dividing the second coding units 1110a and 1110b generated by dividing the first coding unit 1100 in the vertical direction in the horizontal direction, and can process the third coding units 1116a, 1116b, 1116c, and 1116d in the following processing order 1117: first processing the third coding units 1116a and 1116c included in the left second coding unit 1110a in the vertical direction, and then processing the third coding units 1116b and 1116d included in the right second coding unit 1110b in the vertical direction.

[0153] According to an embodiment, the image decoding apparatus 150 can determine the third coding units 1126a, 1126b, 1126c, and 1126d by dividing the second coding units 1120a and 1120b generated by dividing the first coding unit 1100 in the horizontal direction in the vertical direction, and can process the third coding units 1126a, 1126b, 1126c, and 1126d in the following processing order 1127: first processing the third coding units 1126a and 1126b included in the upper second coding unit 1120a in the horizontal direction, and then processing the third coding units 1126c and 1126d included in the lower second coding unit 1120b in the horizontal direction.

[0154] Referring to Figure 11The square third coding units 1116a, 1116b, 1116c, and 1116d and 1126a, 1126b, 1126c, and 1126d can be determined by dividing the second coding units 1110a, 1110b, 1120a, and 1120b, respectively. Although the second coding units 1110a and 1110b are determined by dividing the first coding unit 1100 in the vertical direction and the second coding units 1120a and 1120b are determined by dividing the first coding unit 1100 in the horizontal direction, the third coding units 1116a, 1116b, 1116c, and 1116d from the second coding units 1110a and 1110b and the third coding units 1126a, 1126b, 1126c, and 1126d from the second coding units 1120a and 1120b finally show coding units of the same shape divided from the first coding unit 1100. As such, by recursively dividing coding units differently based on at least one of the block shape information and the division shape information, even if the coding units are finally determined to be of the same shape, the image decoding apparatus 150 can process the plurality of coding units in different orders.

[0155] Figure 12 A process of determining depths of coding units as shapes and sizes of the coding units change when the coding units are determined as a plurality of coding units as the coding units are recursively divided according to an embodiment is shown.

[0156] According to an embodiment, the image decoding apparatus 150 can determine depths of coding units based on a preset criterion. For example, the preset criterion can be a length of a long side of a coding unit. When a length of a long side of a coding unit before being divided is 2n(n>0) times a length of a long side of a current coding unit after being divided, the image decoding apparatus 150 can determine that the depth of the current coding unit is increased by n from the depth of the coding unit before being divided. In the following description, a coding unit having an increased depth is denoted as a coding unit of a deeper depth.

[0157] Referring to Figure 12According to an embodiment, the image decoding apparatus 150 can determine the second coding unit 1202 and the third coding unit 1204 of a deeper depth by dividing the first coding unit 1200 of a square shape based on the block shape information indicating the square shape (e.g., the block shape information can be represented as "0:SQUARE"). Assuming that the size of the first coding unit 1200 of the square shape is 2Nx2N, the second coding unit 1202 determined by dividing the width and the height of the first coding unit 1200 by 1 / 2 can have a size of NxN. Also, the third coding unit 1204 determined by dividing the width and the height of the second coding unit 1202 by 1 / 2 can have a size of N / 2xN / 2. In this case, the width and the height of the third coding unit 1204 are 1 / 4 of the width and the height of the first coding unit 1200. When the depth of the first coding unit 1200 is D, the depth of the second coding unit 1202 whose width and height are 1 / 2 of the width and the height of the first coding unit 1200 can be D+1, and the depth of the third coding unit 1204 whose width and height are 1 / 4 of the width and the height of the first coding unit 1200 can be D+2.

[0158] According to an embodiment, the image decoding apparatus 150 can determine the second coding unit 1212 or 1222 and the third coding unit 1214 or 1224 of a deeper depth by dividing the first coding unit 1210 or 1220 of a non-square shape based on the block shape information indicating the non-square shape (e.g., the block shape information can be represented as "1:NS_VER" indicating a non-square shape in which the height is longer than the width, or can be represented as "2:NS_HOR" indicating a non-square shape in which the width is longer than the height).

[0159] The image decoding apparatus 150 can determine the second coding unit 1202, 1212, or 1222 by dividing at least one of the width and the height of the first coding unit 1210 having a size of Nx2N. That is, the image decoding apparatus 150 can determine the second coding unit 1202 having a size of NxN or the second coding unit 1222 having a size of NxN / 2 by dividing the first coding unit 1210 in the horizontal direction, or can determine the second coding unit 1212 having a size of N / 2xN by dividing the first coding unit 1210 in the horizontal direction and the vertical direction.

[0160] According to an embodiment, the image decoding apparatus 150 can determine the second coding units 1202, 1212, or 1222 by dividing at least one of the width and the height of the first coding unit 1220 having a size of 2N×N. That is, the image decoding apparatus 150 can determine the second coding unit 1202 having a size of N×N or the second coding unit 1212 having a size of N / 2×N by dividing the first coding unit 1220 in a vertical direction, or can determine the second coding unit 1222 having a size of N×N / 2 by dividing the first coding unit 1220 in a horizontal direction and a vertical direction.

[0161] According to an embodiment, the image decoding apparatus 150 can determine the third coding units 1204, 1214, or 1224 by dividing at least one of the width and the height of the second coding unit 1202 having a size of N×N. That is, the image decoding apparatus 150 can determine the third coding unit 1204 having a size of N / 2×N / 2, the third coding unit 1214 having a size of N / 4×N / 2, or the third coding unit 1224 having a size of N / 2×N / 4 by dividing the second coding unit 1202 in a vertical direction and a horizontal direction.

[0162] According to an embodiment, the image decoding apparatus 150 can determine the third coding units 1204, 1214, or 1224 by dividing at least one of the width and the height of the second coding unit 1212 having a size of N / 2×N. That is, the image decoding apparatus 150 can determine the third coding unit 1204 having a size of N / 2×N / 2 or the third coding unit 1224 having a size of N / 2×N / 4 by dividing the second coding unit 1212 in a horizontal direction, or can determine the third coding unit 1214 having a size of N / 4×N / 2 by dividing the second coding unit 1212 in a vertical direction and a horizontal direction.

[0163] According to an embodiment, the image decoding apparatus 150 can determine the third coding units 1204, 1214, or 1224 by dividing at least one of the width and the height of the second coding unit 1222 having a size of N×N / 2. That is, the image decoding apparatus 150 can determine the third coding unit 1204 having a size of N / 2×N / 2 or the third coding unit 1214 having a size of N / 4×N / 2 by dividing the second coding unit 1222 in a vertical direction, or can determine the third coding unit 1224 having a size of N / 2×N / 4 by dividing the second coding unit 1222 in a vertical direction and a horizontal direction.

[0164] According to an embodiment, the image decoding apparatus 150 can divide the square coding unit 1200, 1202, or 1204 in a horizontal direction or a vertical direction. For example, the image decoding apparatus 150 can determine a first coding unit 1210 having a size of N×2N by dividing the first coding unit 1200 having a size of 2N×2N in a vertical direction, or can determine a first coding unit 1220 having a size of 2N×N by dividing the first coding unit 1200 in a horizontal direction. According to an embodiment, when a depth is determined based on a length of a longest side of a coding unit, the depth of a coding unit determined by dividing the first coding unit 1200 having a size of 2N×2N in a horizontal direction or a vertical direction can be the same as the depth of the first coding unit 1200.

[0165] According to an embodiment, the width and the height of the third coding unit 1214 or 1224 can be 1 / 4 of the width and the height of the first coding unit 1210 or 1220. When the depth of the first coding unit 1210 or 1220 is D, the depth of the second coding unit 1212 or 1222 having a width and a height of 1 / 2 of the width and the height of the first coding unit 1210 or 1220 can be D+1, and the depth of the third coding unit 1214 or 1224 having a width and a height of 1 / 4 of the width and the height of the first coding unit 1210 or 1220 can be D+2.

[0166] Figure 13 A depth that can be determined based on a shape and a size of a coding unit and a part index (PID) for distinguishing the coding unit according to an embodiment are shown.

[0167] According to an embodiment, the image decoding apparatus 150 can determine second coding units of various shapes by dividing the square first coding unit 1300. Referring to Figure 13 , the image decoding apparatus 150 can determine the second coding units 1302a and 1302b, the second coding units 1304a and 1304b, and the second coding units 1306a, 1306b, 1306c, and 1306d by dividing the first coding unit 1300 in at least one of a vertical direction and a horizontal direction based on the division shape information. That is, the image decoding apparatus 150 can determine the second coding units 1302a and 1302b, the second coding units 1304a and 1304b, and the second coding units 1306a, 1306b, 1306c, and 1306d based on the division shape information of the first coding unit 1300.

[0168] According to an embodiment, depths of the second coding units 1302a and 1302b, the second coding units 1304a and 1304b, and the second coding units 1306a, 1306b, 1306c, and 1306d determined based on the division shape information of the square-shaped first coding unit 1300 can be determined based on lengths of their long sides. For example, because the length of the side of the square-shaped first coding unit 1300 is equal to the length of the long side of the non-square-shaped second coding units 1302a and 1302b and 1304a and 1304b, the first coding unit 1300 and the non-square-shaped second coding units 1302a and 1302b and 1304a and 1304b can have the same depth, e.g., D. However, when the image decoding device 150 divides the first coding unit 1300 into four square-shaped second coding units 1306a, 1306b, 1306c, and 1306d based on the division shape information, because the length of the side of the square-shaped second coding units 1306a, 1306b, 1306c, and 1306d is 1 / 2 of the length of the side of the first coding unit 1300, the depths of the second coding units 1306a, 1306b, 1306c, and 1306d can be D+1, which is 1 deeper than the depth D of the first coding unit 1300.

[0169] According to an embodiment, the image decoding device 150 can determine the plurality of second coding units 1312a and 1312b and 1314a, 1314b, and 1314c by dividing the first coding unit 1310 having a height longer than a width in a horizontal direction based on the division shape information. According to an embodiment, the image decoding device 150 can determine the plurality of second coding units 1322a and 1322b and 1324a, 1324b, and 1324c by dividing the first coding unit 1320 having a width longer than a height in a vertical direction based on the division shape information.

[0170] According to an embodiment, depths of the second coding units 1312a and 1312b, the second coding units 1314a, 1314b, and 1314c, the second coding units 1322a and 1322b, and the second coding units 1324a, 1324b, and 1324c determined based on the division shape information of the non-square-shaped first coding unit 1310 or 1320 can be determined based on lengths of their long sides. For example, because the length of the side of the square-shaped second coding units 1312a and 1312b is 1 / 2 of the length of the long side of the first coding unit 1310 having a non-square shape with a height longer than a width, the depth of the square-shaped second coding units 1312a and 1312b is D+1, which is 1 deeper than the depth D of the non-square-shaped first coding unit 1310.

[0171] Also, the image decoding apparatus 150 can divide the first coding unit 1310, which is not square, into an odd number of second coding units 1314a, 1314b, and 1314c based on the division shape information. The odd number of second coding units 1314a, 1314b, and 1314c can include the second coding units 1314a and 1314c, which are not square, and the second coding unit 1314b, which is square. In this case, because the length of the long side of the second coding units 1314a and 1314c, which are not square, and the length of the side of the second coding unit 1314b, which is square, are 1 / 2 of the length of the long side of the first coding unit 1310, the depth of the second coding units 1314a, 1314b, and 1314c can be D+1, which is 1 deeper than the depth D of the first coding unit 1310, which is not square. The image decoding apparatus 150 can determine the depth of the coding units divided from the first coding unit 1320 having a non-square shape in which the width is longer than the height, by using the above-described method of determining the depth of the coding units divided from the first coding unit.

[0172] According to an embodiment, when the odd number of divided coding units do not have equal sizes, the image decoding apparatus 150 can determine the PIDs for identifying the divided coding units based on the size ratio between the coding units. Referring to Figure 13 , the coding unit 1314b at the center position among the odd number of divided coding units 1314a, 1314b, and 1314c can have a width equal to the widths of the other coding units 1314a and 1314c and a height twice the heights of the other coding units 1314a and 1314c. That is, in this case, the coding unit 1314b at the center position can include two of the other coding units 1314a or 1314c. Accordingly, when the PID of the coding unit 1314b at the center position is 1 based on the scanning order, the PID of the coding unit 1314c located at a position adjacent to the coding unit 1314b can increase by 2 and thus can be 3. That is, there can be discontinuity in the PID values. According to an embodiment, the image decoding apparatus 150 can determine whether the odd number of divided coding units do not have equal sizes based on whether there is discontinuity in the PIDs for identifying the divided coding units.

[0173] According to an embodiment, the image decoding apparatus 150 can determine whether to use a certain division method based on the PID values for identifying a plurality of coding units determined by dividing a current coding unit. Referring to Figure 13, the image decoding apparatus 150 can determine an even number of coding units 1312a and 1312b or an odd number of coding units 1314a, 1314b, and 1314c by dividing the first coding unit 1310 having a rectangular shape with a height longer than a width. The image decoding apparatus 150 can identify each coding unit using a PID. According to an embodiment, the PID can be obtained from a sample at a preset position (e.g., a top-left sample) of each coding unit.

[0174] According to an embodiment, the image decoding apparatus 150 can determine a coding unit at a preset position among divided coding units by using a PID for distinguishing the coding units. According to an embodiment, when the division shape information of the first coding unit 1310 having a rectangular shape with a height longer than a width indicates that the coding unit is divided into three coding units, the image decoding apparatus 150 can divide the first coding unit 1310 into three coding units 1314a, 1314b, and 1314c. The image decoding apparatus 150 can assign a PID to each of the three coding units 1314a, 1314b, and 1314c. The image decoding apparatus 150 can compare the PIDs of the odd number of divided coding units to determine a coding unit at a center position among the odd number of divided coding units. The image decoding apparatus 150 can determine the coding unit 1314b having a PID corresponding to an intermediate value among the PIDs of the coding units as a coding unit at a center position among the coding units determined by dividing the first coding unit 1310. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding apparatus 150 can determine a PID for distinguishing the divided coding units based on a size ratio between the coding units. Referring to Figure 13, the width of the coding unit 1314b generated by dividing the first coding unit 1310 can be equal to the widths of the other coding units 1314a and 1314c, and the height thereof can be twice the heights of the other coding units 1314a and 1314c. In this case, when the PID of the coding unit 1314b at the center position is 1, the PID of the coding unit 1314c located at a position adjacent to the coding unit 1314b can increase by 2 and thus can be 3. When the PID is not uniformly increased as described above, the image decoding apparatus 150 can determine that the coding unit is divided into a plurality of coding units including a coding unit having a size different from the sizes of the other coding units. According to an embodiment, when the division shape information indicates that the coding unit is divided into an odd number of coding units, the image decoding apparatus 150 can divide the current coding unit in such a manner that a coding unit at a predetermined position (e.g., a coding unit at a center position) among the odd number of coding units has a size different from the sizes of the other coding units. In this case, the image decoding apparatus 150 can determine the coding unit at the center position having the different size by using the PID of the coding unit. However, the PID of the coding unit at the predetermined position and the size or position are not limited to the above-described example, and various PIDs of the coding unit and various positions and sizes can be used.

[0175] According to an embodiment, the image decoding apparatus 150 can use a predetermined data unit in which the coding unit is recursively divided.

[0176] Figure 14 A determination of a plurality of coding units based on a plurality of predetermined data units included in a picture according to an embodiment is illustrated.

[0177] According to an embodiment, the predetermined data unit can be defined as a data unit in which the coding unit is recursively divided by using at least one of block shape information and division shape information. That is, the predetermined data unit can correspond to a coding unit used to determine the highest depth of a plurality of coding units divided from a current picture. In the following description, the predetermined data unit is referred to as a reference data unit for convenience of explanation.

[0178] According to an embodiment, the reference data unit can have a predetermined size and a predetermined size shape. According to an embodiment, the reference coding unit can include MxN samples. Here, M and N can be equal to each other and can be an integer expressed as a power of 2. That is, the reference data unit can have a square shape or a non-square shape and can be divided into an integer number of coding units.

[0179] According to an embodiment, the image decoding apparatus 150 can divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding apparatus 150 can divide the plurality of reference data units divided from the current picture by using the division information about each of the reference data units. The operation of dividing the reference data units can correspond to the division operation using the quad-tree structure.

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

[0181] Referring to Figure 14 , the image decoding apparatus 150 can use the square reference coding unit 1400 or the non-square reference coding unit 1402. According to an embodiment, the shape and size of the reference coding unit can be determined based on various data units (e.g., sequence, picture, slice, slice segment, largest coding unit, etc.) capable of including one or more reference coding units.

[0182] According to an embodiment, the receiver 160 of the image decoding apparatus 150 can obtain at least one of the reference coding unit shape information and the reference coding unit size information for each of the various data units from the bitstream. The operation of dividing the square reference coding unit 1400 into one or more coding units has been described above with respect to the operation of dividing the current coding unit 1000 of Figure 10 , and the operation of dividing the non-square reference coding unit 1402 into one or more coding units has been described above with respect to the operation of dividing the current coding unit 1100 or 1150 of Figure 11 . Accordingly, detailed descriptions thereof will not be provided here.

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

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

[0185] Figure 15 A processing block used as a unit for determining a determination order of the reference coding unit included in the picture 1500 according to an embodiment is illustrated.

[0186] According to an embodiment, the image decoding apparatus 150 can determine one or more processing blocks split from a picture. The processing block is a data unit including one or more reference coding units split from the picture, and the one or more reference coding units included in the processing block can be determined according to a certain order. That is, the determination order of the one or more reference coding units determined in each processing block can correspond to one of various types of orders for determining the reference coding units, and can vary according to the processing block. The determination order of the reference coding units determined for each processing block can be one of various orders (e.g., a raster scan order, a zigzag scan, an N zigzag scan, a right-up diagonal scan, a horizontal scan, and a vertical scan), but is not limited to the above-mentioned scan orders.

[0187] According to an embodiment, the image decoding apparatus 150 can obtain processing block size information, and can determine the size of one or more processing blocks included in a picture. The image decoding apparatus 150 can obtain the processing block size information from a bitstream, and can determine the size of one or more processing blocks included in a picture. The size of the processing block can be a preset size of a data unit indicated by the processing block size information.

[0188] According to an embodiment, the receiver 160 of the image decoding apparatus 150 can obtain the processing block size information from a bitstream according to each certain data unit. For example, the processing block size information can be obtained from a bitstream in data units such as an image, a sequence, a picture, a slice, or a slice segment. That is, the receiver 160 can obtain the processing block size information from a bitstream according to each of various data units, and the image decoding apparatus 150 can determine the size of one or more processing blocks split from a picture by using the obtained processing block size information. The size of the processing block can be an integer multiple of the size of the reference coding unit.

[0189] According to an embodiment, the image decoding apparatus 150 can determine the size of the processing blocks 1502 and 1512 included in the picture 1500. For example, the image decoding apparatus 150 can determine the size of the processing blocks based on the processing block size information obtained from a bitstream. Referring to FIG. 15B, the image decoding apparatus 150 can determine the size of the processing blocks 1502 and 1512 based on the processing block size information obtained from a bitstream. Figure 15 According to an embodiment, the image decoding apparatus 150 can determine the width of the processing blocks 1502 and 1512 as four times the width of the reference coding unit, and can determine the height of the processing blocks 1502 and 1512 as four times the height of the reference coding unit. The image decoding apparatus 150 can determine the determination order of one or more reference coding units in one or more processing blocks.

[0190] According to an embodiment, the image decoding device 150 can determine the processing blocks 1502 and 1512 included in the image 1500 based on the size of the processing blocks, and can determine the determination order of one or more reference coding units in the processing blocks 1502 and 1512. According to an embodiment, determining the reference coding units may include determining the size of the reference coding units.

[0191] According to an embodiment, the image decoding device 150 can obtain determination order information of one or more reference coding units included in one or more processing blocks from a bitstream, and can determine a determination order for one or more reference coding units based on the obtained determination order information. The determination order information can be defined as the order or direction of the reference coding units in a processing block. That is, the determination order of the reference coding units can be determined independently for each processing block.

[0192] According to an embodiment, image decoding device 150 can obtain deterministic order information of reference coding units from a bitstream based on each specific data unit. For example, receiver 160 can obtain deterministic order information of reference coding units from a bitstream based on each data unit (such as an image, sequence, frame, strip, strip fragment, or processing block). Because the deterministic order information of reference coding units indicates the order of reference coding units used to determine a processing block, deterministic order information can be obtained for each specific data unit comprising an integer number of processing blocks.

[0193] According to an embodiment, the image decoding device 150 may determine one or more reference coding units based on a determined order.

[0194] According to an embodiment, receiver 160 can obtain the determination order information of reference coding units from the bitstream as information related to processing blocks 1502 and 1512, and image decoding device 150 can determine the determination order of one or more reference coding units included in processing blocks 1502 and 1512, and determine one or more reference coding units included in frame 1500 based on the determination order. (Refer to...) Figure 15 The image decoding device 150 can determine the determination order 1504 and 1514 of one or more reference coding units in processing blocks 1502 and 1512, respectively. For example, when obtaining the determination order information of reference coding units for each processing block, determination order information of different types of reference coding units can be obtained for processing blocks 1502 and 1512. When the determination order 1504 of reference coding units in processing block 1502 is a raster scan order, the reference coding units included in processing block 1502 can be determined according to the raster scan order. Conversely, when the determination order 1514 of reference coding units in another processing block 1512 is a reverse raster scan order, the reference coding units included in processing block 1512 can be determined according to the reverse raster scan order.

[0195] FIGS. 1 to Figure 15 A method of dividing an image into a maximum coding unit and dividing the maximum coding unit into coding units of a hierarchical tree structure is shown. Figures 16 to 24 A method of determining a quantization parameter of a current block is shown.

[0196] The image encoding apparatus 100 of FIG. 1 can transform residual data, which is a difference between an original value of a pixel included in a coding unit and a predicted value thereof, through a preset process. In this regard, the image encoding apparatus 100 can reduce the size of the residual data by quantizing the transformed residual data, without losing the residual data.

[0197] Quantization of the residual data is performed based on the quantization parameter. The quantization parameter indicates an index of a scaling matrix used to derive quantization of the residual data of the current block. When the quantization parameter is large, a scaling matrix having relatively large elements is derived. Accordingly, when the quantization parameter is large, the residual data is largely lost, but the compression rate of the residual data increases. In contrast, when the quantization parameter is small, a scaling matrix having relatively small elements is derived. Accordingly, when the quantization parameter is small, the residual data is little lost, but the compression rate of the residual data decreases.

[0198] That is, in a case where subjective image quality deterioration is small even when the compression rate of the residual data increases, a larger quantization parameter can be used. However, in a case where subjective image quality deterioration is detected when the compression rate of the residual data increases, a smaller quantization parameter must be used. Accordingly, in consideration of deterioration of image quality, different quantization parameters must be used for blocks of the same picture.

[0199] Figure 16 An image decoding apparatus for determining a quantization parameter of a block and decoding residual data of the block according to the determined quantization parameter is shown.

[0200] The image decoding apparatus 1600 includes a quantization parameter determiner 1610 and a dequantizer 1620. In Figure 16 The quantization parameter determiner 1610 and the dequantizer 1620 are shown as separate components in

[0201] The quantization parameter determiner 1610 and the dequantizer 1620 are shown as being included in one apparatus in Figure 16 The quantization parameter determiner 1610 and the dequantizer 1620 are shown as being included in one apparatus in

[0202] According to an embodiment, the quantization parameter determiner 1610 and the inverse quantizer 1620 can be implemented by one processor. In another embodiment, the quantization parameter determiner 1610 and the inverse quantizer 1620 can be implemented by a plurality of processors.

[0203] The image decoding apparatus 1600 can perform inverse quantization based on a quantization group including one or more blocks. Hereinafter, a method of inverse quantization based on a quantization group will now be described.

[0204] When the quantization parameter varies in each block, information about the quantization parameter increases. Accordingly, when the quantization parameter is determined for a block unit, coding efficiency can decrease. Accordingly, in order to improve coding efficiency, a method of determining the same quantization parameter for a plurality of blocks will now be discussed.

[0205] Generally, neighboring blocks have the same or similar quantization parameters. Accordingly, the image decoding apparatus 1600 can use the same quantization parameter for neighboring blocks. A plurality of blocks that are adjacent to each other and use the same quantization parameter are referred to as a quantization group.

[0206] A quantization group can be determined based on a maximum coding unit. For example, a quantization group can be set for a block divided a preset number of times from the maximum coding unit. When the block for which the quantization group is set is not divided further, the quantization parameter of the quantization group is applied only to the block for which the quantization group is set. In contrast, when the block corresponding to the quantization group is divided further, the quantization parameter of the quantization group can be applied to all sub-blocks generated by dividing the block for which the quantization group is set.

[0207] Alternatively, a quantization group can be determined based on a size. For example, when the size of a block is equal to or smaller than a quantization group reference size, a quantization group can be set for the block. When the block for which the quantization group is set is not divided further, the quantization parameter of the quantization group is applied only to the block for which the quantization group is set. In contrast, when the block corresponding to the quantization group is divided further, the quantization parameter of the quantization group can be applied to all sub-blocks generated by dividing the block for which the quantization group is set. Accordingly, the quantization parameter of a block is determined based on a quantization group, such that information about the quantization parameter decreases.

[0208] The quantization parameter determiner 1610 can obtain a differential quantization parameter allowed flag of an upper layer data unit for a current quantization group. When the differential quantization parameter allowed flag indicates that the quantization parameter is determined according to a differential quantization parameter, the quantization parameter determiner 1610 can obtain a differential quantization parameter of the current block.

[0209] The upper layer data unit can be one of a video parameter set (VPS), a sequence parameter set (SPS), and a picture parameter set (PPS). Accordingly, the quantization parameter determiner 1610 can apply a method of determining a quantization parameter based on a quantization group to all blocks included in the upper layer data unit.

[0210] The quantization parameter determiner 1610 can obtain quantization group information of an upper layer data unit for a current quantization group. The quantization group information indicates a method of determining a quantization group. For example, the quantization group information can include block partition information or block size information. When the difference quantization parameter allowing flag allows a difference quantization parameter, the quantization parameter determiner 1610 can obtain the quantization group information.

[0211] The quantization parameter determiner 1610 can determine a predicted quantization parameter of the current quantization group, wherein the predicted quantization parameter is determined according to at least one of the block partition information and the block size information.

[0212] The block partition information can include a quad-tree partitioning number and a non-quad-tree partitioning number. The quad-tree partitioning number indicates a number of times that a quad-tree partitioning is performed to obtain the current quantization group from a maximum coding block. For example, for a maximum coding block 210a of Figure 2 The partitioning method illustrated in FIG. 2B corresponds to a quad-tree partitioning.

[0213] The non-quad-tree partitioning number indicates a number of times that a partitioning other than a quad-tree partitioning is performed to obtain the current quantization group from the maximum coding block. For example, for a maximum coding block 210a, Figure 3 The partitioning method illustrated in FIG. 2C corresponds to a non-quad-tree partitioning.

[0214] The block size information can include an area of a block or a log value with base 2 of the area of the block. In addition, a height and a width of a block or a log value with base 2 of the height and the width of the block can be included in the block size information.

[0215] According to an embodiment, the quantization parameter determiner 1610 can determine the current quantization group according to the quad-tree partitioning number. When only a quad-tree partitioning is used to partition a maximum coding unit, a quantization group can be set for a block having at least a preset size according to the quad-tree partitioning number. For example, when a size of the maximum coding unit is 256x256 and the quad-tree partitioning number is 2, a quantization group can be set for a block having a size of 64x64 or more.

[0216] Figures 17a to 17d FIG. 2D is a diagram of an embodiment in which a quantization group is determined according to a quad-tree partitioning number.

[0217] Referring to FIG. 2E, Figure 17aAccording to the quad-tree partitioning, the block 1704 is partitioned into four blocks 1710, 1712, 1714, and 1716. The quad-tree partitioning number of the blocks 1710, 1712, 1714, and 1716 is set to 2. According to the quad-tree partitioning, the block 1716 is partitioned into four blocks 1718, 1720, 1722, and 1724. The quad-tree partitioning number of the blocks 1718, 1720, 1722, and 1724 is set to 3. Based on the blocks 1702, 1706, 1708, 1710, 1712, 1714, 1718, 1720, 1722, and 1724 determined when the partitioning of the maximum coding block 1700 is completed, prediction and transform coding and decoding can be performed.

[0218] As shown in Figure 17a When the quad-tree partitioning number is increased by 1, the size of the partitioned block is reduced by half. Therefore, only when the quad-tree partitioning is allowed, the size of the block can be determined according to the quad-tree partitioning number.

[0219] Figure 17b An embodiment of determining the quantization groups for the blocks with the quad-tree partitioning number of 1 is shown. Referring to Figure 17b The quantization groups are set for the four blocks 1702, 1704, 1706, and 1708 with the quad-tree partitioning number of 1.

[0220] Each of the blocks 1702, 1706, and 1708 is individually included in each of the quantization groups for the blocks 1702, 1706, and 1708. However, the quantization group of the block 1704 includes the sub-blocks 1710, 1712, 1714, 1718, 1720, 1722, and 1724 of the block 1704. Therefore, quantization and inverse quantization according to the same quantization parameter can be applied to the sub-blocks 1710, 1712, 1714, 1718, 1720, 1722, and 1724 of the block 1704.

[0221] Figure 17c An embodiment of determining the quantization groups for the blocks with the quad-tree partitioning number of 2 is shown. Referring to Figure 17c The quantization groups are set for the blocks 1702, 1706, 1708, 1710, 1712, 1714, and 1716 with the quad-tree partitioning number equal to or less than 2. For the blocks 1702, 1706, and 1708, the quad-tree partitioning number is 1, but the blocks 1702, 1706, and 1708 are not further partitioned so that the quantization groups are set for the blocks 1702, 1706, and 1708.

[0222] Each of the blocks 1702, 1706, 1708, 1710, 1712, and 1714 is individually included in each of the quantization groups thereof. However, the quantization group of the block 1716 includes the sub-blocks 1718, 1720, 1722, and 1724 of the block 1716. Accordingly, quantization and dequantization according to the same quantization parameter can be applied to the sub-blocks 1718, 1720, 1722, and 1724 of the block 1716.

[0223] Figure 17d An embodiment of determining a quantization group for a block having a quad-tree split number of 3 is shown. Because there is no block having a quad-tree split number of 4 in Figure 17d Because there is no block having a quad-tree split number of 4 in

[0224] Referring to Figures 17a to 17d As the quad-tree split number of the block split information increases, the size of the quantization group decreases. Conversely, as the quad-tree split number of the block split information decreases, the size of the quantization group increases. Accordingly, the size of the quantization parameter information can increase or decrease based on the quad-tree split number of the block split information.

[0225] The quantization parameter determiner 1610 can determine a current quantization group according to the quad-tree split number and the non-quad-tree split number. When both the quad-tree split and the non-quad-tree split are applied to the split of a block, the method of determining a quantization group shown in Figures 17a to 17d Accordingly, the quantization group can be determined also considering the non-quad-tree split number, or the method of determining a quantization group based on the size of the quantization group can be applied to determine the quantization group. Figures 18a to 18c An embodiment of a method of determining a quantization group in a largest coding block to which a non-quad-tree split is applied is shown.

[0226] Figure 18a How the largest coding block 1800 is split is shown. The numbers marked in each block indicate the number of splits performed on the largest coding block 1800.

[0227] The largest coding block 1800 is quad-tree split into four blocks 1802, 1804, 1806, and 1808. Because the block 1802 is not split further, the split number of the block 1802 is 1. Hereinafter, it is assumed that the size of the largest coding block 1800 is 4N x 4N.

[0228] The block 1804 is divided into two 2NxN blocks 1810 and 1812. Then, the block 1810 is divided into two NxN blocks 1814 and 1816, and the block 1812 is divided into two N / 2xN blocks 1818 and 1822 and one NxN block 1820. The number of divisions of the sub-blocks 1814, 1816, 1818, 1820, 1822 of the block 1804 is 3.

[0229] The block 1806 is divided into two Nx2N blocks 1824 and 1826. Then, the block 1824 is divided into two NxN blocks 1828 and 1830, and the block 1826 is divided into two NxN / 2 blocks 1840 and 1844 and one NxN block 1842. The block 1828 is divided into two N / 2xN blocks 1832 and 1834. The block 1834 is divided into two N / 2xN / 2 blocks 1836 and 1838. The number of divisions of the sub-blocks 1828, 1830, 1840, 1842 and 1844 of the block 1806 is 3. The number of divisions of the block 1832 divided from the block 1828 is 4, and the number of divisions of the blocks 1836 and 1838 is 5.

[0230] The block 1808 is divided into four NxN blocks 1846, 1848, 1850 and 1852. The block 1846 is divided into four N / 2xN / 2 blocks 1854, 1856, 1858 and 1860. Further, the block 1848 is divided into two N / 2xN blocks 1862 and 1864, and the block 1862 is divided into two N / 2xN / 2 blocks 1866 and 1868. The number of divisions of the blocks 1850 and 1852 is 2, the number of divisions of the blocks 1854, 1856, 1858, 1860 and 1864 is 3. The number of divisions of the blocks 1866 and 1868 is 4.

[0231] When the quantization groups are set according to the number of divisions of the blocks, the sizes of the quantization groups can not be uniform. In detail, referring to Figure 18b Now, the non-uniformity of the sizes of the quantization groups will be described.

[0232] Figure 18b An embodiment of setting the quantization groups for the blocks whose number of divisions is 3 is shown. Referring to Figure 18b The quantization groups are set for the blocks 1814, 1816, 1818, 1820, 1822, 1828, 1830, 1840, 1842, 1844, 1854, 1856, 1858, 1860, 1862 and 1864 whose number of divisions is 3.

[0233] However, the number of divisions of the block 1814 is equal to the number of divisions of the block 1854, but the size of the block 1814 is four times the size of the block 1854. Although the size of the block 1836 is equal to the size of the block 1854, the quantization parameter of the quantization group corresponding to the block 1828 is applied to the block 1836, whereas the quantization parameter of the quantization group corresponding to the block 1854 is applied to the block 1854.

[0234] The quantization parameter determiner 1610 can determine the current quantization group according to the weighted sum of the number of quad-tree divisions and the number of non-quad-tree divisions only when the embodiment of the present application performs quad-tree division. The quad-tree division is the same as sequentially applying the vertical division and the horizontal division. Therefore, one quad-tree division is substantially the same as two non-quad-tree divisions. Figures 17a to 17d The size of the quantization group is the same only when the embodiment of the present application performs quad-tree division. However, as described above, in the case where the size of the quantization group is set according to the number of divisions when non-quad-tree division is performed, the size of the quantization group is different.

[0235] Figure 18c A method for solving the problem is shown. For example, the quantization parameter determiner 1610 can determine the current quantization group according to the weighted sum of the number of quad-tree divisions and the number of non-quad-tree divisions. The quad-tree division is the same as sequentially applying the vertical division and the horizontal division. Therefore, one quad-tree division is substantially the same as two non-quad-tree divisions.

[0236] Therefore, the quantization parameter determiner 1610 subdivides the number of divisions into the number of quad-tree divisions and the number of non-quad-tree divisions, and can set the quantization group based on the weighted sum of the number of quad-tree divisions and the number of non-quad-tree divisions according to the weight of 2:1.

[0237] For example, the block 1814 is generated due to one quad-tree division and two non-quad-tree divisions from the maximum coding unit 1800. Therefore, the weighted sum of the number of quad-tree divisions and the number of non-quad-tree divisions according to the weight of 2:1 for the block 1814 is 4. The block 1846 is generated due to two quad-tree divisions from the maximum coding unit 1800. Therefore, the weighted sum of the number of quad-tree divisions and the number of non-quad-tree divisions according to the weight of 2:1 for the block 1846 is 4. Therefore, when the quantization group is set for the block for which the weighted sum is 4, the quantization parameter of the quantization group corresponding to the block 1828 is applied to the block 1836, whereas the quantization parameter of the quantization group corresponding to the block 1854 is applied to the block 1854. Figure 18b Unlike in the case of the block 1814, the block 1854 obtains the quantization parameter from the quantization group set for the block 1846. Figure 18c

[0238] According to another embodiment, the quantization parameter determiner 1610 can determine the current quantization group based on the sum of the height and the width of the block or the average of the height and the width of the block. For example, when the quantization group is set for a block having a size of NxN, the quantization group is set for the block 1814 and the block 1846. Therefore, unlike in the case of the block 1814, the block 1854 obtains the quantization parameter from the quantization group set for the block 1846. Figure 18b Unlike in the case of the block 1814, the block 1854 obtains the quantization parameter from the quantization group set for the block 1846. Figure 18c ​In this case, the block 1854 obtains a quantization parameter from a quantization group set for the block 1846. Since the upper blocks 1812 and 1826 are larger than the size of N x N and thus there is no quantization group corresponding thereto, the quantization group is set for the blocks 1818, 1822, 1840, and 1844 even when the blocks 1818, 1822, 1840, and 1844 are smaller than the size of N x N.

[0239] Similarly, the quantization parameter determiner 1610 can determine the current quantization group based on a sum of base-2 logarithm values of the height and width of the block or an average of base-2 logarithm values of the height and width of the block. Alternatively, the quantization parameter determiner 1610 can determine the current quantization group based on an area of the block or a base-2 logarithm value of the area.

[0240] The quantization parameter determiner 1610 can determine a prediction quantization parameter of the current block based on a quantization parameter of an upper neighboring block of the current quantization group, a quantization parameter of a left neighboring block of the current quantization group, and a quantization parameter of a quantization group that has been decoded just before the current quantization group.

[0241] For example, the quantization parameter determiner 1610 can determine an average of the quantization parameter of the upper neighboring block and the quantization parameter of the left neighboring block as the quantization parameter of the current quantization group. When the quantization parameter of the upper neighboring block does not exist, the quantization parameter determiner 1610 can use the quantization parameter of the quantization group that has been decoded just before the current quantization group instead of the quantization parameter of the upper neighboring block to determine the quantization parameter of the current quantization group. Likewise, when the quantization parameter of the left neighboring block does not exist, the quantization parameter determiner 1610 can use the quantization parameter of the quantization group that has been decoded just before the current quantization group instead of the quantization parameter of the left neighboring block to determine the quantization parameter of the current quantization group.

[0242] In addition, the quantization parameter determiner 1610 can determine a default quantization parameter of a slice or a picture as the prediction quantization parameter. For example, when the quantization parameter of the upper neighboring block, the quantization parameter of the left neighboring block, and the quantization parameter of the quantization group that has been decoded just before the current quantization group, which the current quantization group refers to, do not exist, the default quantization parameter can be used.

[0243] The quantization parameter determiner 1610 determines a differential quantization parameter of the current quantization group. The quantization parameter determiner 1610 can obtain differential quantization parameter size information and differential quantization parameter sign information from the bitstream. The quantization parameter determiner 1610 can determine the differential quantization parameter of the current quantization group based on the differential quantization parameter size information and the differential quantization parameter sign information.

[0244] When the current quantization group includes two or more blocks, the quantization parameter determiner 1610 can obtain the differential quantization parameter size information and the differential quantization parameter sign information for a block that will be decoded first in the scan order. Then, the quantization parameter determiner 1610 does not obtain the differential quantization parameter size information and the differential quantization parameter sign information for the remaining blocks of the current quantization group, and applies the quantization parameter determined for the block that will be decoded first to the remaining blocks. As a result, the quantization parameter determiner 1610 applies the same quantization parameter to all the blocks of the current quantization group.

[0245] When the quantization parameter determiner 1610 decodes all the blocks of the current quantization group and then decodes the blocks of a new quantization group, the quantization parameter determiner 1610 can initialize the differential quantization parameter and the differential quantization parameter-related information. The differential quantization parameter-related information can include differential quantization parameter decoding information indicating whether the differential quantization parameter has been decoded and quantization group position information indicating the position of the quantization group.

[0246] The quantization parameter determiner 1610 can initialize the differential quantization parameter and the differential quantization parameter-related information, and can obtain new differential quantization parameter size information and new differential quantization parameter sign information from the bitstream.

[0247] The quantization parameter determiner 1610 determines the quantization parameter of the current quantization group based on the predicted quantization parameter and the differential quantization parameter of the current quantization group. In detail, the quantization parameter determiner 1610 can determine the quantization parameter based on the sum of the predicted quantization parameter and the differential quantization parameter of the current quantization group. According to an embodiment, the quantization parameter determiner 1610 can obtain quantization parameter offset information from the bitstream, and can adjust the determined quantization parameter according to the quantization parameter offset information.

[0248] The inverse quantizer 1620 inverse-quantizes the current block included in the current quantization group based on the quantization parameter of the current quantization group.

[0249] Figure 19 The syntax structure shown in FIG. 7 illustrates a method of decoding the differential quantization parameter included in the bitstream when both the quad-tree partitioning and the non-quad-tree partitioning are allowed.

[0250] Figure 19 The table in FIG. 8 illustrates a quad-tree partitioning syntax structure (coding_quadtree). Figure 19 The quad-tree partitioning syntax structure of FIG. 8 provides a configuration of determining whether to initialize the differential quantization parameter and the differential quantization parameter-related information before determining whether to perform the quad-tree partitioning.

[0251] In Figure 19In the quad-tree partitioning syntax structure of FIG. 1, "cu_qp_delta_enabled_flag" indicates a differential quantization parameter enabling flag, "cqtDepth" indicates a quad-tree partitioning number, and "diff_cu_qp_delta_depth" indicates block partitioning information. "CuQpDeltaVal" indicates a differential quantization parameter, "IsCuQpDeltaCoded" indicates differential quantization parameter decoding information, and "CuQgTopLeftX" and "CuQgTopLeftY" indicate quantization group position information.

[0252] Referring to Figure 19 When "cu_qp_delta_enabled_flag" indicates 1 and "cqtDepth" is equal to or smaller than "diff_cu_qp_delta_depth", "CuQpDeltaVal" and "IsCuQpDeltaCoded" are determined to be 0, and "CuQgTopLeftX" and "CuQgTopLeftY" are determined to be x0 and y0 indicating the top-left sample position of the current block.

[0253] When "cu_qp_delta_enabled_flag" indicates 1, this means that a differential quantization parameter is allowed to be obtained.

[0254] When "cqtDepth" is equal to or smaller than "diff_cu_qp_delta_depth", this means that the quad-tree partitioning number of the current block is equal to or smaller than the partitioning number of a reference as a quantization group indicated by the block partitioning information. The feature that the quad-tree partitioning number of the current block is equal to or smaller than the partitioning number of the reference as the quantization group means that the current block is not included in a quantization group of a block decoded before the current block.

[0255] When the above conditions are satisfied, "CuQpDeltaVal" and "IsCuQpDeltaCoded" are determined to be 0, and a new differential quantization parameter with respect to a quantization group located at "CuQgTopLeftX" and "CuQgTopLeftY" is obtained based on the newly obtained differential quantization parameter information from the bitstream.

[0256] Figure 19 The table in the middle of FIG. 1 shows a non-quad-tree partitioning syntax structure. Figure 19 The non-quad-tree partitioning syntax structure of FIG. 1 provides a configuration of determining whether to initialize a differential quantization parameter and differential quantization parameter related information before determining whether to perform non-quad-tree partitioning.

[0257] In Figure 19In the non-quaternary tree partitioning syntax structure, "cu_qp_delta_enabled_flag" indicates a differential quantization parameter enabling flag, "cqtDepth" indicates a quaternary tree partitioning number, "mttDepth" indicates a non-quaternary tree partitioning number, and "diff_cu_qp_delta_depth" indicates block partitioning information. "CuQpDeltaVal" indicates a differential quantization parameter, "IsCuQpDeltaCoded" indicates differential quantization parameter decoding information, and "CuQgTopLeftX" and "CuQgTopLeftY" indicate quantization group position information.

[0258] Referring to Figure 19 When "cu_qp_delta_enabled_flag" indicates 1 and the sum of "cqtDepth" and "mttDepth" is equal to or smaller than "diff_cu_qp_delta_depth", "CuQpDeltaVal" and "IsCuQpDeltaCoded" are determined to be 0, and "CuQgTopLeftX" and "CuQgTopLeftY" are determined to be x0 and y0 indicating the position of the top-left sample of the current block.

[0259] Similar to the quaternary tree partitioning syntax structure, even in the non-quaternary tree partitioning syntax structure, the differential quantization parameter and the differential quantization parameter related information are initialized. However, unlike the quaternary tree partitioning syntax structure, in the non-quaternary tree partitioning syntax structure, the sum of "cqtDepth" and "mttDepth" is compared with "diff_cu_qp_delta_depth" instead of "cqtDepth". In Figure 19 In the non-quaternary tree partitioning syntax structure, the sum of "cqtDepth" and "mttDepth" is compared with "diff_cu_qp_delta_depth", but according to an embodiment, a weighted sum of "cqtDepth" and "mttDepth" can be compared with "diff_cu_qp_delta_depth".

[0260] Figure 19 The table in the below of the transform block syntax structure shows. tu_cbf_luma[x0][y0] indicates whether the current luma block located at (x0, y0) has residual data. Then, tu_cbf_cb[x0][y0] and tu_cbf_cr[x0][y0] indicate whether the current Cb block and the current Cr block located at (x0, y0) respectively have residual data. When the current luma block, the current Cb block, and the current Cr block do not have residual data, the differential quantization parameter information is not obtained.

[0261] In contrast, when at least one of the current luma block, the current Cb block, and the current Cr block includes residual data, "cu_qp_delta_abs" indicating difference quantization parameter size information and "cu_qp_delta_sign_flag" indicating difference quantization parameter sign information are obtained from the bitstream. Then, "CuQpDeltaVal" indicating the difference quantization parameter is determined from "cu_qp_delta_abs" and "cu_qp_delta_sign_flag". In addition, "IsCuQpDeltaCoded" indicating whether the difference quantization parameter exists is determined as 1.

[0262] When the block to be decoded after the current block is included in the same quantization group as the current block (i.e., when the (weighted) sum of "cqtDepth" or "cqtDepth" and "mttDepth" is greater than "diff_cu_qp_delta_depth"), "CuQpDeltaVal" and "IsCuQpDeltaCoded" are not initialized, and thus, the block to be decoded after the current block is inverse quantized according to "CuQpDeltaVal" used in the decoding process for the current block.

[0263] In Figure 19 In the transform block syntax structure, the configuration for obtaining the difference quantization parameter information is implemented, but according to embodiments, the configuration can be implemented in other syntax.

[0264] Figure 20 An image decoding method of determining a quantization parameter of a block according to a quantization group and decoding residual data of the block according to the determined quantization parameter is illustrated.

[0265] In operation 2010, a predicted quantization parameter of a current quantization group determined according to at least one of block split information and block size information is determined.

[0266] The current quantization group can be determined according to the number of quad-tree splits and the number of non-quad-tree splits. In detail, the current quantization group can be determined according to the weighted sum of the number of quad-tree splits and the number of non-quad-tree splits.

[0267] The current quantization group can be determined based on the sum of the height and the width of the block or the average of the height and the width of the block. Alternatively, the current quantization group can be determined based on the sum of the logarithm values with base 2 of the height and the width of the block or the average of the logarithm values with base 2 of the height and the width of the block. Alternatively, the current quantization group can be determined based on the area of the block or the logarithm value with base 2 of the area.

[0268] The prediction quantization parameter of the current block can be determined based on a quantization parameter of an upper neighboring block of the current quantization group, a quantization parameter of a left neighboring block of the current quantization group, and a quantization parameter of a quantization group that has been decoded immediately before the current quantization group.

[0269] At operation 2020, a differential quantization parameter of the current quantization group is determined. In detail, the differential quantization parameter size information and the differential quantization parameter sign information can be obtained from the bitstream. Then, the differential quantization parameter of the current quantization group can be determined based on the differential quantization parameter size information and the differential quantization parameter sign information.

[0270] According to an embodiment, when the differential quantization parameter enabling flag indicates that the quantization parameter is allowed to be determined according to the differential quantization parameter, the differential quantization parameter of the current block can be obtained.

[0271] At operation 2030, a quantization parameter of the current quantization group is determined based on the prediction quantization parameter and the differential quantization parameter of the current quantization group. For example, the quantization parameter of the current quantization group can be determined based on a sum of the prediction quantization parameter and the differential quantization parameter.

[0272] At operation 2040, the current block included in the current quantization group is inverse quantized according to the quantization parameter of the current quantization group.

[0273] Figure 20 The image decoding method of FIG. 1 can include various embodiments of the method of determining a quantization parameter with respect to the quantization group of the image decoding apparatus of FIG. 1. Figure 16 The image decoding apparatus of FIG. 1 can include various embodiments of the method of determining a quantization parameter with respect to the quantization group of the image decoding apparatus of FIG. 1.

[0274] The image decoding apparatus 1600 can perform inverse quantization based on the quantization parameter unit indicating a region in which the same quantization parameter is used. Hereinafter, the inverse quantization method based on the quantization parameter unit will now be described.

[0275] Figure 21 An embodiment of a quantization parameter unit structure and a coding block tree structure is illustrated.

[0276] Pictures or slices can differ in terms of subjective image quality degradation of their parts. Therefore, in order to optimize coding efficiency, it is necessary to set different quantization parameters according to characteristics of respective parts of pictures or slices. The distribution of quantization parameters does not equal the coding block tree structure which is a basic unit of coding. Therefore, a quantization parameter unit map is determined independently of the coding block tree structure.

[0277] In the Figure 21 In the Figure 21In the middle, the quantization parameter unit 2110 is illustrated as a rectangle, but according to embodiments, the quantization parameter unit 2110 can be illustrated as an irregular shape rather than a rectangle.

[0278] The quantization parameters of the quantization parameter unit 2110 can be determined according to characteristics of a portion of a corresponding picture. The quantization parameter map 2120 and the quantization parameters of the quantization parameter unit 2110 are encoded and decoded independently of the prediction encoding information according to the coding block structure 2140. When the residual data of the coding block 2130 is encoded and decoded, the quantization parameter can be obtained from the quantization parameter unit 2110 corresponding to the position of the coding block 2130.

[0279] The quantization parameter determiner 1610 can match the current block with a current quantization parameter unit based on at least one of a position and a size of the current block.

[0280] For example, the quantization parameter determiner 1610 can determine a quantization parameter unit including a coordinate value of an upper-left sample of the current block as the current quantization parameter unit of the current block.

[0281] As another example, when the current block includes a plurality of quantization parameter units, the quantization parameter determiner 1610 can determine the plurality of quantization parameter units as the current quantization parameter unit of the current block. In this regard, the quantization parameter determiner 1610 can determine an average value of a plurality of quantization parameters of the current quantization parameter unit as the quantization parameter of the current block.

[0282] Figure 22a and Figure 22b A method of determining a quantization parameter unit corresponding to a current block is illustrated.

[0283] Figure 22a An embodiment in which the quantization parameter unit 2200 corresponds to a plurality of coding blocks 2202 to 2224 is illustrated. Blocks 2202, 2204, 2206, 2210, 2212, and 2214 all included in the quantization parameter unit 2200 are dequantized according to the quantization parameter corresponding to the quantization parameter unit 2200.

[0284] Then, blocks partially included in the quantization parameter unit 2200 can be determined based on whether the quantization parameter of the quantization parameter unit 2200 will be applied to the blocks partially included in the quantization parameter unit 2200 based on an upper-left sample of the blocks. Accordingly, blocks 2208, 2216, 2218, 2220, 2222, and 2224, of which the upper-left samples are included in the quantization parameter unit 2200, can be dequantized according to the quantization parameter corresponding to the quantization parameter unit 2200.

[0285] In Figure 22aIn some embodiments, the quantization parameter unit is determined based on a top-left sample of the block. However, in accordance with embodiments, the quantization parameter unit of a block can be determined based on a center sample of the block, a top-right sample of the block, a bottom-left sample of the block, a bottom-right sample of the block, etc.

[0286] Figure 22b An embodiment is shown in which a plurality of quantization parameter units 2252-2274 correspond to block 2250.

[0287] Quantization parameter units 2252, 2254, 2258, 2260, 2264, and 2266 are completely included in block 2250. Thus, block 2250 can be dequantized in accordance with at least one quantization parameter of quantization parameter units 2252, 2254, 2258, 2260, 2264, and 2266. For example, the quantization parameter of block 2250 can be determined as an average of the quantization parameters of quantization parameter units 2252, 2254, 2258, 2260, 2264, and 2266.

[0288] Optionally, quantization parameter units 2256, 2262, 2268, 2270, 2272, and 2274, which partially overlap with block 2250, can be used to determine the quantization parameter of block 2250. Thus, block 2250 can be dequantized in accordance with a quantization parameter determined in accordance with at least one of quantization parameter units 2252-2274.

[0289] Figure 23a and Figure 23b An embodiment is shown in which a block corresponds to a quantization parameter unit.

[0290] Figure 23a An embodiment is shown in which a block tree structure and quantization parameter map in accordance with an embodiment. In accordance with embodiments, a quantization parameter unit corresponding to a top-left sample of a block corresponds to the block. Thus, block 2308 corresponds to quantization parameter unit 2300, block 2310 corresponds to quantization parameter unit 2302, block 2312 corresponds to quantization parameter unit 2304, and block 2314 corresponds to quantization parameter unit 2306. When the correspondence reference of block 2308 and quantization parameter unit 2300 is different, other quantization parameter units 2302, 2304, and 2306 can correspond to block 2308.

[0291] Figure 23b An embodiment is shown in which a block tree structure and quantization parameter map in accordance with an embodiment. As Figure 23bWhen the quantization parameter unit corresponding to the top-left sample of a block corresponds to the block, all blocks 2328, 2330, 2332, and 2334 correspond to the quantization parameter unit 2326. Because the quantization parameter of the quantization parameter unit 2326 is applied to all blocks 2328, 2330, 2332, and 2334, the quantization parameter is first calculated for the block 2328 having the earliest decoding order. Then, the quantization parameter for the block 2328 can be used unchanged for the blocks 2330, 2332, and 2334.

[0292] A quantization parameter is not determined for a block that does not have residual data. For example, when the block 2328 does not have residual data, dequantization is not needed for the block 2328, and thus, a quantization parameter for the block 2328 is not determined. When the block 2330 to be decoded after the block 2328 has residual data, a quantization parameter for the block 2330 can be determined. Then, the quantization parameter for the block 2330 can be used unchanged for the blocks 2332 and 2334.

[0293] The quantization parameter determiner 1610 can obtain a predicted quantization parameter for a current quantization parameter unit.

[0294] The quantization parameter determiner 1610 can obtain the predicted quantization parameter from at least one of a left quantization parameter unit of the current quantization parameter unit, an upper quantization parameter unit of the current quantization parameter unit, and a block decoded immediately before the current block.

[0295] Alternatively, the quantization parameter determiner 1610 can determine a predicted quantization parameter for a picture or slice including the current quantization parameter unit as the predicted quantization parameter for the current quantization parameter unit.

[0296] The quantization parameter determiner 1610 can obtain a differential quantization parameter for the current quantization parameter unit.

[0297] The quantization parameter determiner 1610 can determine a quantization parameter of the current quantization parameter unit based on the predicted quantization parameter and the differential quantization parameter.

[0298] The dequantizer 1620 can dequantize the current block according to the quantization parameter of the current quantization parameter unit.

[0299] Figure 24 An image decoding method of determining a quantization parameter of a block according to a quantization parameter unit and decoding residual data of the block according to the determined quantization parameter is illustrated.

[0300] In operation 2410, the current block is matched with the current quantization parameter unit based on at least one of a position and a size of the current block.

[0301] According to an embodiment, the quantization parameter unit including a coordinate value of a top-left sample of the current block can be determined as the current quantization parameter unit of the current block.

[0302] According to an embodiment, when the current block includes a plurality of quantization parameter units, the plurality of quantization parameter units can be determined as the current quantization parameter unit of the current block. In this regard, the current quantization parameter of the current block can be determined from at least one of the plurality of quantization parameter units.

[0303] In operation 2420, a prediction quantization parameter for the current quantization parameter unit is obtained.

[0304] According to an embodiment, the prediction quantization parameter can be obtained from at least one of a left quantization parameter unit of the current quantization parameter unit, an upper quantization parameter unit of the current quantization parameter unit, and a block decoded immediately before the current block.

[0305] Optionally, a prediction quantization parameter for a picture or slice including the current quantization parameter unit can be determined as the prediction quantization parameter for the current quantization parameter unit.

[0306] In operation 2430, a differential quantization parameter for the current quantization parameter unit is obtained.

[0307] In operation 2440, a quantization parameter of the current quantization parameter unit is determined based on the prediction quantization parameter and the differential quantization parameter.

[0308] In operation 2450, the current block is dequantized according to the quantization parameter of the current quantization parameter unit.

[0309] Figure 24 The image decoding method of FIG. 1 can include various embodiments of the method of determining a quantization parameter with respect to a quantization group of an image decoding apparatus according to Figure 16 The image decoding method of FIG. 1 can include various embodiments of the method of determining a quantization parameter with respect to a quantization group of an image decoding apparatus according to

[0310] As described above with reference to FIG. 1 to Figure 24 As described above, the image encoding technique based on the tree structure of coding units can encode the spatial domain image data for each of the tree structure of coding units, and the image decoding technique based on the tree structure of coding units can reconstruct the spatial domain image data by decoding each of the maximum coding units, so that a picture and an image as a picture sequence can be reconstructed. The reconstructed video can be reproduced by a reproduction apparatus, can be stored in a storage medium, or can be transmitted via a network.

[0311] The above-described embodiments of the disclosure can be implemented as a computer-executable program and implemented via a computer-readable recording medium for executing the program by a general-purpose digital computer.

[0312] While the present disclosure has been described above in connection with specific and preferred embodiments, it will be evident for a person skilled in the art that many modifications, substitutions and changes can be made to the present disclosure in light of the foregoing description, which are intended to fall within the scope of the present disclosure. That is, the appended claims shall be interpreted to cover all such alternatives, modifications and changes. Therefore, all matters set forth herein and shown in the accompanying drawings should be interpreted as illustrative and non-limiting.

Claims

1. An image decoding method, comprising: obtaining quantization parameter offset information; partitioning an upper layer coding block into a plurality of lower layer coding blocks according to partition information; determining a current quantization group based on a partition value of a current coding block among the plurality of lower layer coding blocks and a partition value of the current quantization group; obtaining a quantization parameter of the current quantization group based on a predicted quantization parameter of the current quantization group and a differential quantization parameter of the current quantization group and the quantization parameter offset information; and dequantizing transform coefficients in a current transform block in the current coding block using the quantization parameter, wherein: if the current coding block is obtained by partitioning the upper layer coding block into two lower layer coding blocks according to non-quaternary tree partitioning, the partition value of the current coding block is added by 1, and if the current coding block is obtained by partitioning the upper layer coding block into four lower layer coding blocks according to quaternary tree partitioning, the partition value of the current coding block is added by 2.

2. An image decoding device, comprising: at least one processor configured to: obtain quantization parameter offset information; partition an upper layer coding block into a plurality of lower layer coding blocks according to partition information; determine a current quantization group based on a partition value of a current coding block among the plurality of lower layer coding blocks and a partition value of the current quantization group; obtain a quantization parameter of the current quantization group based on a predicted quantization parameter of the current quantization group and a differential quantization parameter of the current quantization group and the quantization parameter offset information; and dequantize transform coefficients in a current transform block in the current coding block using the quantization parameter, wherein: if the current coding block is obtained by partitioning the upper layer coding block into two lower layer coding blocks according to non-quaternary tree partitioning, the partition value of the current coding block is added by 1, and if the current coding block is obtained by partitioning the upper layer coding block into four lower layer coding blocks according to quaternary tree partitioning, the partition value of the current coding block is added by 2. The image encoding method comprises: obtaining quantization parameter offset information; 3. A method for storing a bitstream generated by an image encoding method, wherein, partitioning an upper layer coding block into a plurality of lower layer coding blocks; determining a current quantization group based on a partition value of a current coding block among the plurality of lower layer coding blocks and a partition value of the current quantization group; obtaining a quantization parameter of the current quantization group; and quantizing transform coefficients in a current transform block in the current coding block using the quantization parameter, wherein a differential quantization parameter of the current quantization group is obtained based on a quantization parameter of the current quantization group and a predicted quantization parameter of the current quantization group and the quantization parameter offset information, wherein: if the current coding block is obtained by partitioning the upper layer coding block into two lower layer coding blocks according to non-quaternary tree partitioning, the partition value of the current coding block is added by 1, and if the current coding block is obtained by partitioning the upper layer coding block into four lower layer coding blocks according to quaternary tree partitioning, the partition value of the current coding block is added by 2.

4. An image encoding device, comprising: at least one processor configured to: obtain quantization parameter offset information; partition an upper layer coding block into a plurality of lower layer coding blocks; ​ ​ determining the current quantization group based on a split value of a current coding block of the plurality of lower layer coding blocks and a split value of the current quantization group; obtaining a quantization parameter of the current quantization group; and quantizing transform coefficients in a current transform block in the current coding block using the quantization parameter, wherein a differential quantization parameter of the current quantization group is obtained based on a quantization parameter of the current quantization group and a predicted quantization parameter of the current quantization group and the quantization parameter offset information, wherein: if the current coding block is obtained by splitting the upper layer coding block into two lower layer coding blocks according to a non-quaternary tree split, the split value of the current coding block is added by 1, and if the current coding block is obtained by splitting the upper layer coding block into four lower layer coding blocks according to a quaternary tree split, the split value of the current coding block is added by 2.

Citation Information

Patent Citations

  • Image encoding and decoding method and device thereof

    CN103096052A

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

    JP2016192794A