IMAGE CODING METHOD AND DEVICE AND IMAGE DECODING METHOD AND DEVICE
Patent Information
- Authority / Receiving Office
- MX · MX
- Patent Type
- Patents
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CO LTD
- Filing Date
- 2021-09-15
- Publication Date
- 2026-05-19
AI Technical Summary
Existing methods for encoding and decoding high-resolution or high-quality image content are inefficient, particularly in handling large coding units that exceed predetermined sizes, leading to degraded image quality and increased bit rate performance.
The method involves hierarchically dividing coding units based on shape modes, determining transformation units within large coding units, and applying coded block flags and deblocking filters based on unit sizes to optimize encoding and decoding processes.
This approach enhances the quality of reconstructed images and improves bit rate performance by efficiently handling large coding units through precise division and filtering techniques.
Smart Images

Figure MX433733B0
Abstract
Description
IMAGE CODING METHOD AND DEVICE AND IMAGE DECODING METHOD AND DEVICE Field of Invention A method and apparatus according to one embodiment can encode or decode an image by using coding units of various shapes included in the image. A method and apparatus according to one embodiment can efficiently signal coded block flag (CBF) information based on a sub-block according to the size of the coding unit. Furthermore, a method and apparatus according to one embodiment can efficiently perform deblocking filtering based on a sub-block according to the size of the coding unit. Background of the Invention As hardware capable of playing and storing high-resolution or high-quality image content has developed and become very popular, a codec capable of efficiently encoding or decoding high-resolution or high-quality image content is in high demand. The encoded image content can then be played back by decoding it. Recently, methods have been used to efficiently compress high-resolution or high-quality image content. For example, one efficient image compression method is implemented using a οοοαηη / ζζηζ / Ε / γίΛΐ processing process. Ref. 334623 random from an image to encode it. Multiple data units can be used to compress images, and an inclusion relationship may exist between the data units. A data unit can be divided or segmented using various methods to determine the data unit size to be used in image compression, and then an optimal data unit can be determined based on an image characteristic, such that the image can be encoded or decoded. Brief Description of the Invention Technical Problem According to one embodiment of the disclosure, an image decoding method may include: determining a plurality of coding units including a current coding unit, by hierarchically dividing or segmenting a current image, based on a splitting or segmenting manner mode of the current image; when a prediction mode of the current coding unit is an inter mode; obtaining, from a bit stream, a first coded block flag indicating whether blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream;when the first coded block flag indicates that the blocks of the luminance and chrominance components included in the current coding unit οοοαηη / ζζηζ / Ε / γίΛΐ include at least one transformation coefficient in the bit stream, determining whether at least one of the height and width of the current coding unit is larger than a predetermined size; determining whether to divide or segment the current coding unit into transformation units, based on whether at least one of the height and width of the current coding unit is larger than the predetermined size; determining at least one transformation unit included in the current coding unit, based on whether the current coding unit is to be divided or segmented into transformation units;obtaining, based on whether the current coding unit is to be divided or segmented into transformation units, a second coded block flag of the bit stream, the second coded block flag indicating whether a block of a luminance component included in the at least one transformation unit includes at least one transformation coefficient in the bit stream; obtaining a residual signal of the block of the luminance component included in the at least one transformation unit, based on the second coded block flag; reconstructing the current coding unit based on the residual signal and reconstructing the current image including the current coding unit, based on the reconstructed current coding unit, wherein the splitting or segmenting manner mode may indicate; QQoann / zznz / E / YiAi at least one of whether the splitting or segmentation is performed, a splitting or segmentation direction and a splitting type and wherein the splitting type may indicate one of binary splitting, triple splitting and quadruple splitting. According to one embodiment of the disclosure, an image decoding apparatus may include at least one processor configured to: determine a plurality of coding units including a current coding unit, when hierarchically dividing a current image, based on a division shape mode of the current image, when a prediction mode of the current coding unit is an inter mode, and obtain, from a bit stream, a first coded block flag indicating whether blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream, and when the first coded block flag indicates that blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream.determining whether at least one of the height and width of the current coding unit is greater than a predetermined size, determining whether to divide the current coding unit into transformation units, based on whether at least one of the height and width of the current coding unit is greater than the predetermined size, determining at least one transformation unit included in the current coding unit, based on whether the current coding unit is to be divided into the transformation units obtaining, based on whether the current coding unit is to be divided into the transformation units, a second coded block flag of the bit stream,the second coded block flag indicating whether a block of a luminance component included in the at least one transformation unit includes at least one transformation coefficient in the bit stream, obtaining a residual signal of the block of the luminance component included in the at least one transformation unit based on the second coded block flag, reconstructing the current coding unit based on the residual signal, and reconstructing the current image including the current coding unit based on the reconstructed current coding unit, wherein the splitting manner mode may indicate at least one of whether splitting is performed, a splitting direction, and a splitting type, and wherein the splitting type may indicate one of binary splitting, triple splitting, and quadruple splitting. According to one embodiment of the disclosure, the image coding method may include: determining a plurality of coding units including a current coding unit, by hierarchically dividing a current image, based on a division shape mode of the current image; when a prediction mode of the current coding unit is an inter mode, generating a first coded block flag indicating whether blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in a bit stream; when determining that blocks of luminance and chrominance components included in the current coding unit include the at least one transformation coefficient in the bit stream, determining whether at least one of the height and width of the current coding unit is larger than a predetermined size;determining whether to divide the current coding unit into transformation units, based on whether at least one of the height and the width of the current coding unit is greater than the predetermined size; determining at least one transformation unit included in the current coding unit, based on whether the current coding unit is to be divided into the transformation units; encoding a residual signal of a block of a luminance component included in the at least one transformation unit; generating a second coded block flag indicating whether the block of the luminance component included in the at least one unit; QQoann / zznz / E / YiAi transformation includes at least one transformation coefficient in the bit stream, based on whether the current coding unit is to be divided into the transformation units and generate the bit stream including the coded residual signal, the first coded block flag and the second coded block flag, wherein the splitting manner mode may indicate at least one of whether to perform the splitting, a splitting direction and a splitting type, and wherein the splitting type may indicate one of binary splitting, triple splitting and quadruple splitting. According to one embodiment of the disclosure, a computer program for the image decoding method may be recorded on a computer-readable recording medium. Solution to the Problem According to one embodiment of the disclosure, an image decoding method may include: determining a plurality of coding units including a current coding unit, by hierarchically dividing a current image, based on a division shape mode of the current image; when a prediction mode of the current coding unit is an Inter mode, obtaining, from a bit stream, a first coded block flag indicating whether blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream;when the first coded block flag indicates that the blocks of the luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream, determining whether at least one of the height and width of the current coding unit is greater than a predetermined size; determining whether to divide the current coding unit into transformation units, based on whether at least one of the height and width of the current coding unit is greater than the predetermined size; determining at least one transformation unit included in the current coding unit, based on whether the current coding unit is to be divided into the transformation units;obtaining, based on whether the current coding unit is to be divided into the transformation units, a second coded block flag of the bit stream, the second coded block flag indicating whether a block of a luminance component included in the at least one transformation unit includes at least one transformation coefficient in the bit stream; obtaining a residual signal of the block of the luminance component included in the at least one transformation unit, based on the second coded block flag;reconstructing the current coding unit based on the residual signal and reconstructing the current image including the current coding unit, based on the reconstructed current coding unit, wherein the splitting manner mode may indicate at least one of whether the splitting is performed, a splitting direction and a splitting type and wherein the splitting type may indicate one of binary splitting, triple splitting and quadruple splitting; Obtaining, from the bit stream, the first coded block flag may include, when the prediction mode of the current coding unit is the Inter mode and is neither a Blending mode nor a Skip mode, obtaining, from the bit stream, the first coded block flag indicating whether blocks of the luminance and chrominance components included in the current coding unit include the at least one transformation coefficient in the bit stream, and when the prediction mode of the current coding unit is an Intra mode, the first coded block flag about the current coding unit is not obtained from the bit stream, and determining that the first coded block flag indicates that blocks of the luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream. When the first coded block flag indicates that the blocks of the luminance and chrominance components οοοαηη / ζζηζ / Ε / γίΛΐ included in the current coding unit include at least one transformation coefficient in the bit stream, determining whether the at least one of the height and width of the current coding unit is greater than the predetermined size may include determining whether the height of the current coding unit is greater than the maximum size of a transformation unit or the width of the current coding unit is greater than the maximum size of the transformation unit. The determination of whether to divide the current coding unit into the transformation units, based on whether at least one of the height and width of the current coding unit is larger than the predetermined size, may include, when it is determined that at least one of the height and width of the current coding unit is larger than the predetermined size, determining to divide the current coding unit into the transformation units and determining the at least one transformation unit included in the current coding unit, based on whether the current coding unit to be divided into the transformation units may include determining the transformation units that include a transformation unit for which at least one of the height and width has the predetermined size. The entire height and width of at least one unit of QQoann / zznz / E / YiAi determined transformation of current coding unit may be less than or equal to 64 which is the default size. The image decoding method may further include, before obtaining the second coded block flag, obtaining a third coded block flag about at least one luminance component of the bit stream, the third coded block flag indicating whether at least one transformation block of the at least one luminance component includes in the at least one transformation unit including at least one transformation coefficient in the bit stream. Obtaining, based on whether the current coding unit is to be divided into the transformation units, the second coded block flag of the bit stream, the second coded block flag indicating whether the block of the luminance component included in the at least one transformation unit includes at least one transformation coefficient in the bit stream may include, when the prediction mode of the current coding unit is the Inter mode and the third coded block flag about the at least one luminance component is 0 obtaining, based on whether it is determined that the current coding unit is to be divided into the transformation units, the second coded block flag indicating whether the block of the luminance component included in the QQoann / zznz / E / YiAi at least one transformation unit includes at least one transformation coefficient in the bit stream. Obtaining, based on whether the current coding unit is to be divided into the transformation units, the second coded block flag of the bit stream, the second coded block flag indicates whether the block of the luminance component included in the at least one transformation unit includes at least one transformation coefficient in the bit stream may include, when the prediction mode of the current coding unit is the inter mode and the third coded block flag about the at least one luminance component is 0 obtaining, based on whether it is determined that the current coding unit is to be divided into the transformation units, the second coded block flag indicates whether the block of the luminance component included in the at least one transformation unit includes the at least one transformation coefficient in the bit stream. Obtaining, from the bit stream, the first coded block flag indicating whether the blocks of the luminance and chrominance components included in the current coding unit include the at least one transform coefficient in the bit stream may include, when the prediction mode of the current coding unit is the inter mode and is not a blending mode or a jump mode, obtaining QQoann / zznz / E / YiAi the first encoded block flag of the bitstream. Obtaining, from the bit stream, the first coded block flag indicating whether the blocks of the luminance and chrominance components included in the current coding unit include the at least one transform coefficient in the bit stream may include, when a tree type of the current coding unit is a single tree type, obtaining the first coded block flag from the bit stream. When the size of the current coding unit is 128 x 128, the number of the at least one transformation unit may be 4 and the sizes of the four transformation units may be 64 x 64 each, when the size of the current coding unit is 128 x N (where N is a multiple of 2 that is less than 64), the number of the at least one transformation unit may be 2 and the sizes of the two transformation units may be 64 x N and when the size of the current coding unit is N x 128 (where N is a multiple of 2 that is less than 64), the number of the at least one transformation unit may be 2 and the sizes of the two transformation units may each be N x 64. Obtaining the second coded block flag from the bitstream may include, when a tree type of the current coding unit is a single tree type or a QQoann / zznz / E / YiAi dual tree luminance type get the second coded block flag from the bit stream. The reconstruction of the current image including the current coding unit, based on the reconstructed current coding unit, may further include, when at least one of the height and width of the current coding unit is larger than a second predetermined size, performing deblocking filtering at a predetermined boundary location in the current coding unit, the predetermined boundary location being determined based on the second predetermined size. Executing deblocking filtering at the predetermined boundary location in the current coding unit, the predetermined boundary location being determined based on the second predetermined size, may include generating a plurality of blocks by halving at least one of the height and width that is larger than the second predetermined size and performing deblocking filtering at a boundary of the plurality of blocks. The execution of deblocking filtering at the boundary of the plurality of blocks may include: when an edge type to which deblocking filtering is to be performed is a vertical edge and the width of the current coding unit is greater than the second predetermined size, generating the plurality of blocks by dividing the width of the current coding unit and performing deblocking filtering on a vertical boundary of the plurality of blocks; and when the edge type to which deblocking filtering is to be performed is a horizontal edge and the height of the current coding unit is greater than the second predetermined size, generating the plurality of blocks by dividing the height of the current coding unit and performing deblocking filtering on a horizontal boundary of the plurality of blocks. According to one embodiment of the disclosure, an image decoding apparatus may include at least one processor configured to: determine a plurality of coding units including a current coding unit, when hierarchically dividing a current image, based on a division shape mode of the current image, when a prediction mode of the current coding unit is an inter mode, obtain, from a bit stream, a first coded block flag indicating whether blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream, and when the first coded block flag indicates that blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream, determine whether at least one of the height andQQOonn / zznz / E / YiAi width of the current coding unit is greater than a predetermined size, determining whether to divide the current coding unit into transformation units, based on whether at least one of the height and the width of the current coding unit is greater than the predetermined size, determining at least one transformation unit included in the current coding unit, based on whether the current coding unit is to be divided into the transformation units obtain, based on whether the current coding unit is to be divided into the transformation units, a second coded block flag of the bit stream,the second coded block flag indicates whether a block of a luminance component included in the at least one transformation unit includes at least one transformation coefficient in the bit stream, obtaining a residual signal of the block of the luminance component included in the at least one transformation unit based on the second coded block flag, reconstructing the current coding unit based on the residual signal, and reconstructing the current image including the current coding unit based on the reconstructed current coding unit, wherein the splitting manner mode may indicate at least one of whether splitting is performed, a splitting direction, and a splitting type, and wherein the splitting type may indicate one of binary splitting, triple splitting, and quadruple splitting. According to one embodiment of the disclosure, an image coding method may include: determining a plurality of coding units including a current coding unit, by hierarchically dividing a current image, based on a division shape mode of the current image; when a prediction mode of the current coding unit is an Inter mode, generating a first coded block flag indicating whether blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in a bit stream; when determining that blocks of luminance and chrominance components included in the current coding unit include the at least one transformation coefficient in the bit stream, determining whether at least one of the height and width of the current coding unit is larger than a predetermined size;determining whether to divide the current coding unit into transformation units, based on whether at least one of the height and the width of the current coding unit is greater than the predetermined size; determining at least one transformation unit included in the current coding unit, based on whether the current coding unit is to be divided into the transformation units; encoding a residual signal of a block of a luminance component included in the at least one transformation unit;generating a second coded block flag indicating whether the luminance component block included in the at least one transformation unit includes at least one transformation coefficient in the bit stream, based on whether the current coding unit is to be divided into the transformation units and generating the bit stream including the coded residual signal, the first coded block flag and the second coded block flag, wherein the splitting manner mode may indicate at least one of whether to perform splitting, a splitting direction and a splitting type and wherein the splitting type may indicate one of binary splitting, triple splitting and quadruple splitting; According to one embodiment of the disclosure, a computer program for the image decoding method may be recorded on a computer-readable recording medium. Brief Description of the Figures Figure 1A is a block diagram of an image decoding apparatus, according to various embodiments. Figure IB is a flowchart of an image decoding method, according to various embodiments. Figure 1C is a block diagram of an image decoder according to various embodiments. Figure 2A is a block diagram of an image coding apparatus, according to various embodiments. Figure 2B illustrates a flowchart of an image coding method according to various embodiments. Figure 2C is a block diagram of an image encoder according to various embodiments. Figures 3A to 3C illustrate syntax structures of an encoding unit, a transformation tree, and a transformation unit, according to one embodiment. Figures 4A and 4B illustrate syntax structures of an encoding unit and a transformation unit, according to one embodiment. Figures 4C and 4D illustrate syntax structures of an encoding unit and a transformation unit, according to another embodiment. Figure 5 is a diagram for describing a process in which, when the size of the current coding unit is larger than a predetermined size, an image decoding apparatus 100 divides the current coding unit into a plurality of blocks and performs deblocking filtering at a boundary of the plurality of blocks. Figure 6 illustrates a process, performed by the image decoding apparatus, of determining at least one coding unit by dividing a current coding unit, according to an embodiment. Figure 7 illustrates a process, performed by the image decoding apparatus, of determining at least one coding unit by dividing a non-square coding unit, according to an embodiment. Figure 8 illustrates a process, performed by the image decoding apparatus, of dividing a coding unit based on at least one of block shape information and division shape mode information, according to an embodiment. Figure 9 illustrates a method, performed by the image decoding apparatus, for determining a predetermined coding unit from an odd number of coding units, according to an embodiment. Figure 10 illustrates a processing order of a plurality of coding units, when the image decoding apparatus determines the plurality of coding units by dividing a current coding unit, according to an embodiment. Figure 11 illustrates a process, performed by the image decoding apparatus, for determining 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 predetermined order, according to an embodiment. Figure 12 illustrates a process, performed by the image decoding apparatus, of determining at least one QQoann / zznz / E / YiAi coding unit by dividing a first coding unit according to a modality. Figure 13 illustrates that a shape in which a second coding unit can be divided is restricted when the second coding unit having a non-square shape, which is determined when the image decoding apparatus divides a first coding unit, satisfies a predetermined condition, according to an embodiment. Figure 14 illustrates a process, performed by the image decoding apparatus, of dividing a square coding unit when the division shape mode information indicates that the square coding unit should not be divided into four square coding units, according to an embodiment. Figure 15 illustrates that a processing order among a plurality of coding units may be changed depending on a division process of a coding unit, according to an embodiment. Figure 16 illustrates a process for determining the depth of a coding unit as the shape and size of the coding unit change, when the coding unit is recursively divided such that a plurality of coding units, οοοαηη / ζζηζ / Ε / γίΛΐ are determined according to an embodiment. Figure 17 illustrates depths that can be determined based on shapes and sizes of coding units and part indices (PID) that serve to distinguish coding units, according to one embodiment. Figure 18 illustrates that a plurality of coding units are determined based on a plurality of predetermined data units included in an image, according to an embodiment. Figure 19 illustrates a processing block that serves as a criterion for determining an order of determining reference coding units included in an image, according to a modality. Detailed Description of the Invention Advantages and features of embodiments and methods for obtaining them can be more easily understood by reference to the accompanying embodiments and figures. In this regard, the description may take different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this description is thorough and complete and fully conveys the concept of the description to a person of ordinary skill in the art. The terms used in the description will be briefly defined and the modalities will be described in detail. All terms, including descriptive or technical terms, used in the description should be interpreted with meanings obvious to those of ordinary skill in the art. However, the terms may have different meanings depending on the intent of those of ordinary skill in the art, precedent, or the emergence of new technologies. Furthermore, some terms may be arbitrarily selected, and in this case, the meaning of the selected terms will be described in detail in the detailed description of the invention. Therefore, the terms used in the description should not be interpreted based solely on their names, but should be defined based on the meaning of the terms together with the descriptions throughout the description. In the following description, singular forms include plural forms unless the context clearly indicates otherwise. When a part includes or comprises an element, unless there is a particular description contrary to it, the part may also include other elements, without excluding the other elements. In the following descriptions, terms such as "unit" indicate software or a hardware component, and the unit performs certain functions. However, the unit is not limited to software or hardware. The unit may be formed to reside on an addressable storage medium or may be formed to operate one or more processors. Thus, for example, the term "unit" may refer to components such as software components, object-oriented software components, class components, and task components and may include processes, functions, attributes, procedures, subroutines, program code segments, drivers, firmware, microcode, circuits, data, a database, data structures, tables, arrays, or variables. A function provided by the components and units may be associated with the smallest number of components and units or may be divided into additional components and units. According to one embodiment of the disclosure, the unit may be implemented as a processor and memory. The term processor should be broadly interpreted to include a general-purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, and the like. In some environments, processor may refer to an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field-programmable gate array (FPGA), or a programmable logic controller (PLD). QQoann / zznz / E / YiAi (English) or the like. The term processor may refer to a combination of processing devices such as, for example, a combination of a DSP and a microprocessor, a combination of a plurality of microprocessors, a combination of one or more microprocessors in conjunction with a DSP core, or a combination of any other such configurations. The term memory should be broadly interpreted to include any electronic component capable of storing electronic information. The term memory can refer to various types of processor-readable media, such as random-access memory (RAM), read-only memory (ROM), non-volatile random-access memory (NVRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable PROM (EEPROM), flash memory, a magnetic or optical data storage device, registers, and the like. When the processor can read information from a memory and / or write information to the memory, the memory is said to be in a state of electronic communication with the processor.The memory integrated into the processor is in a state of electronic communication with the processor. Hereinafter, an image may be a static image, such as a still image from a video, or it may be a dynamic image, such as a moving image, that is, the video itself. Hereinafter, a sample denotes data assigned to a sampling position of an image, i.e., data to be processed. For example, the pixel values of an image in a spatial domain and transformation coefficients in a transformation domain may be samples. A unit that includes at least such a sample may be defined as a block. Hereinafter, the description will be made more fully with reference to the accompanying figures so that one of ordinary skill in the art may realize the embodiments without any difficulty. Furthermore, portions irrelevant to the descriptions will be omitted from the figures to obtain clear descriptions of the invention. Next, an image coding apparatus and an image decoding apparatus and an image coding method and an image decoding method according to an embodiment will be described with reference to Figs. 1A to 19. A method for determining a data unit of an image according to an embodiment will be described with reference to Figs. 6 to 19, and the encoding or decoding method and apparatus for efficiently signaling coded block flag information based on a sub-block according to a coding unit size or efficiently performing deblocking filtering according to a coding unit size according to an embodiment will be described with reference to Figs. 1A to 5. In this sense, coded block flag information (also referred to as CBF) can refer to flag information indicating whether there is at least one non-zero transform coefficient in a current block as a residual signal indicating a difference between a signal of an original image and a transformed / quantized prediction signal.For example, in the case where the coded block flag information indicates that there is at least one non-zero transformation coefficient in the current block (for example, in the case, the value of a coded block flag may be 1 but the description is not limited thereto), because the coded block flag information indicates that there is at least one non-zero transformation coefficient in the current block, the coded block flag information indicates that entropy coding is performed on a transformation coefficient of the current block. In the case where the coded block flag information indicates that all transformation coefficients in the current block are 0 (for example, in the case, a value of a coded block flag may be 0 but the description is not limited thereto), the coded block flag information indicates that entropy coding is not performed separately in the current block. That is, an image coding apparatus may add coded block flag information to a bit stream and may output the bit stream, and an image decoding apparatus may obtain the coded block flag information from the bit stream and may determine whether entropy decoding is required for a current block, based on the coded block flag information. In this regard, the coded block flag information may be generated according to whether a particular condition is met for each coding unit. However, the description is not limited to this, and the coded block flag information may be generated for each sub-block unit smaller than a coding unit. In addition, coded block flag information can be generated for all luminance and chrominance components, but the description is not limited to them, and coded block flag information can be generated for each component. In this regard, coded block flag information can be generated for all luminance and chrominance components along with coded block flag information for each component. That is, when a value of the block flag information QQoann / zznz / E / YiAi coded for all luminance and chrominance components is 1, coded block flag information can be generated for each component. However, when a value of the coded block flag information for all luminance and chrominance components is 0, coded block flag information may not be generated for each component. Next, encoding / decoding methods and apparatus for efficiently signaling coded block flag information based on a sub-block according to the coding unit size or for efficiently performing deblocking filtering according to the coding unit size according to an embodiment will not be described with reference to Figures 1A to 5. Figure 1A is a block diagram of an image decoding apparatus, according to various embodiments. The image decoding apparatus 100 according to various embodiments may include an acquisition device 105 and an image decoder 110. The acquisition device 105 and the image decoder 110 may include at least one processor. Furthermore, the acquisition device 105 and the image decoder 110 may include a memory for storing instructions to be executed by the at least one processor. The image decoder 110 and the acquisition device 105 may be implemented as separate hardware components, or the image decoder 110 may include the acquisition device 105. The image decoder 110 may determine a plurality of coding units including a current coding unit when hierarchically dividing a current image, based on a division shape mode of the current image. In this regard, the division shape mode may indicate at least one of whether to perform the division, a division direction, and a division type. The division type may indicate one of binary division, triple division, and quadruple division. The obtaining device 105 may obtain division shape mode information of the current image, and the image decoder 110 may hierarchically divide the current image, based on the information obtained from the division shape mode of the current image, and thereby determine the plurality of coding units including the current coding unit. When a prediction mode of a current coding unit is an inter mode, the obtaining device 105 may obtain, from a bit stream, a first coded block flag indicating whether blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream. In this regard, the first coded block flag QQoann / zznz / E / YiAi coded block may be obtained at the coding unit level. For example, the first coded block flag may be included in a portion of the syntax structure of the coding unit. When the prediction mode of the current coding unit is the inter mode and is neither a merge mode nor a skip mode, the obtaining device 105 may obtain the first coded block flag. When the tree type of the current coding unit is a single tree type, the obtaining device 105 may obtain the first coded block flag of a bit stream. In this regard, the tree type may include a single tree type, a dual tree luminance type, and a dual tree chrominance type, wherein the single tree type may indicate that a tree split structure of a luminance component image is the same as a tree split structure of the luminance component image (i.e., the luminance and chrominance component image has a tree split structure), and a dual tree type may indicate that a tree split structure of a luminance component image is different from a tree split structure of the chrominance component image (i.e.,The image of the luminance and chrominance components has separate tree-divided structures) such that the dual-tree type may include the dual-tree luminance type corresponding to the luminance component and the dual-tree chrominance type corresponding to the luminance component. In this sense, tree-dividing may indicate a hierarchical division of a tree structure. A coding unit may have a corresponding tree type, and when the tree type of the coding unit is a single-tree type, the coding unit may include a coding block for a luminance component and a chrominance component. When the tree type of the coding unit is a dual-tree luminance type, the coding unit may include a coding block for a luminance component. When the tree type of the coding unit is a dual-tree chrominance type, the coding unit may include a coding block for a chrominance component. When the first coded block flag indicates that the blocks of the luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream, the obtaining device 105 may determine whether at least one of a height and a width of the current coding unit is larger than a predetermined size. In this case, the predetermined size may be a maximum size of a transformation unit, but the description is not limited thereto. In this regard, the transformation unit may refer to a processing unit for performing the (inverse) transformation, and its size may be limited.The sizes of the coding unit and the transformation unit may be identical, but the size of the largest coding unit may be larger than the maximum size of the transformation unit, and thus a case may occur where the coding unit is larger than the maximum size of the transformation unit. In this regard, the coding unit may be processed by being divided into a plurality of transformation units. The predetermined size may be the same as the height and width, but the description is not limited to this, and thus, sizes for the height and width may exist respectively. For example, the obtaining device 105 may determine whether the height of the current coding unit is greater than 64 or the width of the current coding unit is greater than 64. The obtaining device 105 may determine whether to divide the current coding unit into transformation units, based on whether at least one of the height and width of the current coding unit is larger than the predetermined size. QQoann / zznz / E / YiAi Based on whether the current coding unit is to be divided into transformation units, the obtaining device 105 may determine at least one transformation unit included in the current coding unit. When the obtaining device 105 determines to divide the current coding unit into transformation units, the image decoder 110 may determine a plurality of transformation units when dividing the current coding unit into transformation units, and when the obtaining device 105 determines not to divide the current coding unit into transformation units, the image decoder 110 may determine a transformation unit equal to the size of the current coding unit. In this regard, the image decoder 110 may determine a transformation unit for which at least one of a height and a width has the predetermined size.All heights and widths of one or more given transformation units of the current coding unit may be equal to or less than a predetermined size. For example, when the current coding unit size is 128 x 128, the number of one or more transformation units may be 4, and the sizes of four transformation units may be 64 x 64 each. When the current coding unit size is 128 x N (where N is a multiple of 2 that is less than 64), the number of one or more transformation units may be 2, and the sizes of two transformation units may be 64 x N each. When the size of the current coding unit is N x 12 8 (where N is a multiple of 2 that is less than 64), the number of one or more transformation units may be 2 and the sizes of two transformation units may each be N x 64. Based on whether the current coding unit is to be divided into transformation units, the obtaining device 105 may obtain, from a bit stream, a second coded block flag indicating whether a block of a luminance component included in at least one transformation unit includes at least one transformation coefficient in the bit stream. In this regard, the second coded block flag may be obtained at the coding unit level. When the tree type of the current coding unit is a single tree type or a dual tree luminance type, the obtaining device 105 may obtain the second coded block flag from the bit stream. For example, in the case where the obtaining device 105 determines to divide the current coding unit into transformation units, the obtaining device 105 may obtain, from the bit stream, the second coded block flag for each of a plurality of transformation units included in the current coding unit. When the obtaining device 105 determines to divide the current coding unit into transformation units, the obtaining device 105 may obtain the second coded block flag from the bit stream, regardless of whether another condition is satisfied. When the obtaining device 105 determines not to divide the current coding unit into transformation units, the obtaining device 105 may obtain the second coded block flag from the bit stream, based on a prediction mode of the current coding unit or a value of a third coded block flag. The third coded block flag may be information indicating whether a block of at least one chrominance component included in the at least one transformation unit includes at least one transformation coefficient in the bit stream. The third coded block flag may be obtained from each chrominance component. For example, the chrominance component may be Cb or Cr. The obtaining device 105 may obtain the third coded block flag from the bit stream before obtaining the second coded block flag. When the tree type of the current coding unit is a single tree type or a dual tree chrominance type, the obtaining device 105 may obtain the third coded block flag from the bit stream before obtaining the second coded block flag. QQoann / zznz / E / YiAi getting 105 can get the third coded block flag from the bitstream. For example, when the prediction mode of the current coding unit is not an intra mode, the obtaining device 105 may obtain the second coded block flag of the bit stream. In this regard, the obtaining device 105 may obtain the second coded block flag of the bit stream regardless of the value of the third coded block flag. A case where the prediction mode of the current coding unit is not the intra mode may correspond to a case of an inter mode, and the inter mode may include a normal inter mode, a skip mode, a merge mode, and the like. In this regard, the skip mode refers to a mode in which inter prediction is performed in the current coding unit by using previously decoded motion information and in which the separated motion information and a residual signal are not decoded separately.Fusion mode refers to a mode in which inter-prediction is performed in the current coding unit by using previously decoded motion information and in which the separated motion information is not decoded, but a residual signal can be decoded. Internormal mode can refer to a mode in which inter-prediction is performed in the current coding unit by decoding separate motion information and a residual signal with respect to the current coding unit. The image decoder 110 may obtain a residual signal of a block of a luminance component included in at least one transformation unit, based on the second coded block flag. For example, when the second coded block flag indicates that the block of the luminance component included in at least one transformation unit includes at least one transformation coefficient in the bit stream, the image decoder 110 may obtain the residual signal by entropy decoding and perform inverse quantization and inverse transformation on transformation coefficient information about the block of the luminance component included in at least one transformation unit.When the second coded block flag indicates that the luminance component block included in at least one transformation unit does not include at least one transformation coefficient in the bit stream, the image decoder 110 may obtain the residual signal without entropy decoding transformation coefficient information about the luminance component block included in at least one transformation unit but determine the transformation coefficient value of the component block. QQoann / zznz / E / YiAi luminance is 0. The image decoder 110 may reconstruct the current coding unit based on the residual signal. For example, the image decoder 110 may generate a prediction signal based on a prediction mode of the current coding unit and may reconstruct the current coding unit based on the prediction signal of the current coding unit and the residual signal. The image decoder 110 may reconstruct a current image including the current coding unit based on the reconstructed current coding unit. That is, the image decoder 110 may reconstruct another coding unit in a similar manner with respect to the current coding unit and may generate a reconstructed image of the current image based on the coding units. In this regard, deblocking filtering may be performed on a boundary of at least one coding unit, and the current image may be reconstructed based on a coding unit generated as the deblocking filtering is performed. When at least one of the height and width of a current coding unit is larger than a second predetermined size, the image decoder 110 may perform deblocking filtering at a predetermined boundary location in the current coding unit, the predetermined boundary location being determined based on the second predetermined size. QQoann / zznz / E / YiAi predetermined. When the second predetermined size is a maximum size of the transformation unit, the image decoder 110 may perform deblocking filtering in the horizontal direction or vertical direction at the predetermined boundary location in the current coding unit that is determined by dividing, in the second size, at least one of the height and width of the current coding unit larger than the second predetermined size. For example, the image decoder 110 may perform deblocking filtering at a boundary where a current coding unit of 128 x 128 is divided into coding units of 64 x 64. When at least one of the height and width of the current coding unit is greater than the second predetermined size, the image decoder 110 may generate a plurality of blocks by dividing at least one of the height and width greater than the second predetermined size, and may perform deblocking filtering on a boundary of the plurality of blocks. For example, when at least one of the height and width of the current coding unit is greater than the second predetermined size, the image decoder 110 may generate a plurality of blocks by dividing, in half, at least one of the height and width greater than the second predetermined size, and may perform deblocking filtering on a boundary of the plurality of blocks. In this regard, the second predetermined size may indicate the maximum size of the transformation unit, but the description is not limited thereto.For example, the second predetermined size may be 64. In this regard, at least one of the height and width of the current coding unit that is greater than the second predetermined size may be 128 and thus half thereof may be 64. However, the second predetermined size is not limited to 64 and thus may be one of multiples of 2 and at least one of the height and width of the current coding unit that is greater than the second predetermined size may be one of several multiples of 2 that are greater than the second predetermined size. In a case where the edge type to which deblocking filtering is to be performed is a vertical edge, when the width of the current coding unit is greater than the second predetermined size, the image decoder 110 may generate a plurality of blocks by dividing the width of the current coding unit. The image decoder 110 may perform deblocking filtering on a vertical boundary of the plurality of blocks. In a case where an edge type to which deblocking filtering is to be performed is a horizontal edge, when the height of the current coding unit is greater than the second predetermined size, the image decoder 110 may generate QQoann / zznz / E / YiAi a plurality of blocks by dividing the height of the current coding unit. The image decoder 110 may perform deblocking filtering on a horizontal boundary of the plurality of blocks. Figure IB is a flowchart of an image decoding method, according to various embodiments. In operation S105, the image decoding apparatus 100 may determine a plurality of coding units including a current coding unit, when hierarchically dividing a current image, based on a division shape mode of the current image. In step S110, when the prediction mode of the current coding unit is an inter mode, the image decoding apparatus 100 may obtain, from a bit stream, a first coded block flag indicating whether the luminance and chrominance component blocks included in the current coding unit include at least one transformation coefficient in the bit stream. In this regard, a tree type of the current coding unit may be a single tree type. In operation S115, when the first coded block flag indicates that the blocks of the luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream, the image decoding apparatus QQoann / zznz / E / YiAi 100 may determine whether at least one of the height and width of the current coding unit is greater than a predetermined size. In this regard, the image decoding apparatus 100 may determine whether a log2 value of at least one of the height and width of the current coding unit is greater than a log2 value of the predetermined size. In operation S120, the image decoding apparatus 100 may determine whether to divide the current coding unit into transformation units, based on whether at least one of the height and width of the current coding unit is larger than the predetermined size. In operation S125, the image decoding apparatus 100 may determine at least one transformation unit included in the current coding unit, based on whether the current coding unit is to be divided into the transformation units. In operation S130, based on whether the current coding unit is to be divided into the transformation units, the image decoding apparatus 100 may obtain, from the bit stream, a second coded block flag indicating whether a block of a luminance component included in at least one transformation unit includes at least one transformation coefficient in the bit stream. In operation S135, the image decoding apparatus 100 may obtain a residual signal of the luminance component block included in the at least one transformation unit, based on the second coded block flag. In operation S140, the image decoding apparatus 100 may reconstruct the current coding unit based on the residual signal. In operation S145, the image decoding apparatus 100 may reconstruct the current image including the current coding unit, based on the reconstructed current coding unit. Figure 1C is a block diagram of an image decoder 6000 according to various embodiments. The image decoder 6000 according to various embodiments performs operations necessary for the acquisition device 105 and the image decoder 110 of the image decoding apparatus 100 to decode image data. Referring to Figure 1C, an entropy decoder 6150 parses, from a bit stream 6050, encoded image data to be decoded and encoding information necessary for decoding. The encoded image data is a quantized transform coefficient and an inverse quantizer 6200 and QQoann / zznz / E / YiAi a 6250 inverse transformer reconstructs residual data from the quantized transformation coefficient. An intra-predictor 6400 performs intra-prediction on each of the blocks. An inter-predictor 6350 performs inter-prediction on each block by using a reference image obtained from a reconstructed image buffer 6300. Data of a spatial domain for a block of a current image may be reconstructed by adding residual data and prediction data of each block that are generated by the intra-predictor 6400 or the inter-predictor 6350 and an unblocker 6450 and a sample adaptive shift executor 6500 (SAO) may perform loop filtering on the reconstructed data of the spatial domain, such that a filtered reconstructed image 6600 may be generated. The reconstructed images stored in the reconstructed image buffer 6300 may be output as a reference image. In order for the image decoder 110 of the image decoding apparatus 100 to decode the image data, the image decoder 6000 according to various embodiments may perform operations of each stage in each block. Figure 2A is a block diagram of an image coding apparatus, according to various embodiments. An image coding apparatus 150 according to various embodiments may include an image encoder 155 and a bit stream generator 160. The image encoder 155 and the bitstream generator 160 may include at least one processor. In addition, the image encoder 155 and the bitstream generator 160 may include a memory for storing instructions to be executed by the at least one processor. The image encoder 155 and the bitstream generator 160 may be implemented as separate hardware components, or the image encoder 155 may include the bitstream generator 160. The image encoder 155 may determine a plurality of coding units including a current coding unit, when hierarchically dividing a current image, based on a division shape mode of the current image. In this regard, the division shape mode may indicate at least one of whether to perform the division, a division direction, and a division type. The division type may indicate one of binary division, triple division, and quadruple division. The image encoder 155 may encode division shape mode information of the current image, and the bitstream generator 160 may generate a bitstream including the encoded information of the division shape mode of the current image. When a coding unit prediction mode QQoann / zznz / E / YiAi current is an Inter mode, the image encoder 155 may generate a first coded block flag indicating whether the luminance and chrominance component blocks included in the current coding unit include at least one transform coefficient in the bit stream. In this regard, the first coded block flag may be generated at the coding unit level. When the image encoder 155 determines that the blocks of the luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream, the image encoder 155 may determine whether at least one of a height and a width of the current coding unit is greater than a predetermined size. In this regard, the predetermined size may be a maximum size of a transformation unit, but the description is not limited thereto. For example, the image encoder 155 may determine whether the height of the current coding unit is greater than 64 or the width of the current coding unit is greater than 64. The image encoder 155 may determine whether to divide the current coding unit into transformation units, based on whether at least one of the height and width of the current coding unit is greater than the predetermined size. Based on whether the current coding unit is to be divided into transformation units, the image encoder 155 may determine at least one transformation unit included in the current coding unit. When the image encoder 155 determines to divide the current coding unit into transformation units, the image encoder 155 may determine a plurality of transformation units when dividing the current coding unit into transformation units, and when the image encoder 155 determines not to divide the current coding unit into transformation units, the image encoder 155 may determine a transformation unit equal to a size of the current coding unit.In this regard, the image encoder 155 may determine a transformation unit for which at least one of the height and width has the predetermined size, where the height and width are greater than the predetermined size. All heights and widths of one or more determined transformation units of the current coding unit may be equal to or less than the predetermined size. For example, when the current coding unit size is 128 x 128, the number of one or more transformation units may be 4, and the sizes of four transformation units may be 64 x 64 each. When the size QQoann / zznz / E / YiAi of the current coding unit is 128 x N (where N is a multiple of 2 that is less than 64), the number of one or more transformation units may be 2, and the sizes of two transformation units may be 64 x N each. When the size of the current coding unit is N x 128 (where N is a multiple of 2 that is less than 64), the number of one or more transformation units may be 2, and the sizes of two transformation units may each be N x 64. The image encoder 155 may encode a residual signal of a block of a luminance component included in the at least one transformation unit. The image encoder 155 may generate a prediction signal of the current coding unit, based on a prediction mode of the current coding unit, and may generate the residual signal based on a signal of the current coding unit of an original image and the prediction signal. The image encoder 155 may generate a transformation coefficient by transforming / quantizing the residual signal of the current coding unit. In this regard, when all transformation coefficients of a current block are 0, information about the transformation coefficients of the current block may not be entropy encoded, and when they are not 0, information about the transformation coefficients may be entropy encoded. The image encoder 155 may generate a second coded block flag indicating whether the luminance component block included in the at least one transformation unit includes at least one transformation coefficient in a bit stream, based on whether the current coding unit is to be divided into transformation units. The image encoder 155 may generate the bit stream including the coded residual signal, the first coded block flag, and the second coded block flag. However, in a case where all of the transformation coefficients of the current block are 0, the information about the transformation coefficients may not be entropy encoded, and the coded residual signal with respect to the current block may not exist, and in this case, the residual signal with respect to the current block may not be included in the bit stream. When the image encoder 155 determines to divide the current coding unit into transformation units, the image encoder 155 may generate the second coded block flag for each of a plurality of transformation units included in the current coding unit. When the image encoder 155 determines to divide the current coding unit into transformation units, the image encoder 155 may generate the second coded block flag, regardless of whether another condition is satisfied. When the image encoder 155 determines not to divide the current coding unit into transformation units, the image encoder 155 may generate the second coded block flag based on a prediction mode of the current coding unit or a predetermined condition. In this regard, the predetermined condition may be a condition as to whether a block of at least one chrominance component included in at least one transformation unit includes at least one transformation coefficient in a bit stream. A determination may be made as to whether the predetermined condition is satisfied for each chrominance component. The image encoder 155 may generate the third coded block flag based on the predetermined condition, before the second coded block flag is generated. For example, when the prediction mode of the current coding unit is not an intra mode (i.e., when it is an Inter mode), the image encoder 155 may generate the second coded block flag. In this regard, the second coded block flag may be generated regardless of the value of the third coded block flag. In a case where the prediction mode of the current coding unit is an inter mode and is neither a fusion mode nor a skip mode, the image encoder 155 may generate the first coded block flag. When the tree type of the current coding unit is a single tree type, the image encoder 155 may generate the first coded block flag. When the tree type of the current coding unit is a single tree type or a dual tree luminance type, the image encoder 155 may generate the second coded block flag. When the tree type of the current coding unit is the single tree type or a dual tree chrominance type, the image encoder 155 may generate the third coded block flag. The image encoder 155 may reconstruct the current coding unit based on the coded residual signal. For example, the image encoder 155 may reconstruct the current coding unit based on the prediction signal generated based on the prediction mode of the current coding unit and the coded residual signal. The image encoder 155 may reconstruct the current image including the current coding unit, based on QQoann / zznz / E / YiAi in the reconstructed current coding unit. That is, the image encoder 155 may reconstruct another coding unit in a similar manner with respect to the current coding unit and may generate a reconstructed image of the current image, based on the coding units. When at least one of the height and width of a current coding unit is larger than a second predetermined size, the image encoder 155 may perform deblocking filtering at a predetermined boundary location in the current coding unit that is determined based on the second predetermined size. When the second predetermined size is a maximum size of a transformation unit, the image encoder 155 may perform deblocking filtering in the horizontal direction or the vertical direction at the predetermined boundary location in the current coding unit that is determined by dividing, in the second size, at least one of the height and width of the current coding unit larger than the second predetermined size. For example, when the second predetermined size is 64 and the size of the current coding unit is 128 x 128, the image encoder 155 may perform deblocking filtering at a boundary where the current coding unit of 128 x 128 is divided into 64 x 64 coding units. When at least one of the height and width of the current coding unit is greater than the second predetermined size, the image encoder 155 may generate a plurality of blocks by dividing at least one of the height and width larger than the second predetermined size, and may perform deblocking filtering on a boundary of the plurality of blocks. For example, when at least one of the height and width of the current coding unit is greater than the second predetermined size, the image encoder 155 may generate a plurality of blocks by dividing, in half, at least one of the height and width sizes larger than the second predetermined size, and may perform deblocking filtering on a boundary of the plurality of blocks. In this regard, the second predetermined size may indicate the maximum size of the transformation unit, but the description is not limited thereto. For example, the second predetermined size may be 64.In this regard, at least one of the height and width of the current coding unit that is larger than the second predetermined size may be 128 and thus half thereof may be 64. However, the second predetermined size is not limited to 64 and thus may be one of multiples of 2 and at least one of the height and width of the current coding unit that is larger than the second predetermined size may be one of several multiples of 2 that are larger than the second predetermined size. QQoann / zznz / E / YiAi In a case where an edge type to be deblocked filtering is a vertical edge, when the width of the current coding unit is greater than the second predetermined size, the image encoder 155 may generate a plurality of blocks by dividing the width of the current coding unit. The image encoder 155 may perform deblocking filtering on a vertical boundary of the plurality of blocks. In a case where an edge type to be deblocked filtering is a horizontal edge, when the height of the current coding unit is greater than the second predetermined size, the image encoder 155 may generate a plurality of blocks by dividing the height of the current coding unit. The image encoder 155 may perform deblocking filtering on a horizontal boundary of the plurality of blocks. Figure 2B illustrates a flowchart of an image coding method according to various embodiments. In operation S155, the image coding apparatus 150 may determine a plurality of coding units including a current coding unit, when hierarchically dividing a current image, based on a division shape mode of the current image. In operation S160, when the prediction mode of the current coding unit is an inter mode, the image coding apparatus 150 may generate a first coded block flag indicating whether the blocks of luminance and chrominance components included in the current coding unit include at least one transformation coefficient in a bit stream. In operation S165, when the image coding apparatus 150 determines that the blocks of the luminance and chrominance components included in the current coding unit include at least one transformation coefficient in the bit stream, the image coding apparatus 150 may determine whether at least one of the height and width of the current coding unit is larger than a predetermined size. In operation S170, the image coding apparatus 150 may determine whether to divide the current coding unit into transformation units, based on whether at least one of the height and width of the current coding unit is larger than the predetermined size. In operation S175, the image coding apparatus 150 may determine at least one transformation unit included in the current coding unit, based on whether the current coding unit is to be divided into transformation units. In operation S180, the image coding apparatus 150 may encode a residual signal of a block QQOonn / zznz / E / YiAi of a luminance component included in at least one transformation unit. In operation S185, the image coding apparatus 150 may generate a second coded block flag indicating whether the luminance component block included in the at least one transformation unit includes at least one transformation coefficient, based on whether the current coding unit is to be divided into transformation units. In operation S190, the image coding apparatus 150 may generate the bit stream including the coded residual signal, the first coded block flag, and the second coded block flag. Figure 2C is a block diagram of an image encoder according to various embodiments. An image encoder 7000 according to various embodiments performs operations necessary for the image encoder 155 and the bit stream generator 160 of the image coding apparatus 150 to encode image data. That is, an intra-predictor 7200 performs an intra-prediction on each block of a current image 7050 and an inter-predictor 7150 performs an inter-prediction on each block by using the current image 7050 and a reference image obtained from a reconstructed image buffer 7100. Prediction data is subtracted from data of a block to be encoded in the current image 7050, where the prediction data is related to each block and is output from the intra-predictor 7200 or the inter-predictor 7150 and the transformer 7250 and the quantizer 7300 can output a quantized transformation coefficient of each block by performing transformation and quantization on residual data. An inverse quantizer 7450 and an inverse transformer 7500 can reconstruct residual data of a spatial domain by performing inverse quantization and inverse transformation on the quantized transformation coefficient. The reconstructed residual data of the spatial domain can be added to the prediction data that is related to each block and is output from the intra-predictor 7200 or the inter-predictor 7150 and, therefore, can be reconstructed as data of a spatial domain with respect to a block of the current image 7050.An unblocker 7550 and an SAO execution device 7600 generate a filtered reconstructed image by performing loop filtering on the reconstructed spatial domain data. The generated reconstructed image is stored in the reconstructed image buffer 7100. The reconstructed images stored in the reconstructed image buffer 7100 may be used as a reference image for inter-prediction with respect to another image. QQoann / zznz / E / YiAi entropy encoder 7350 can entropy encode the quantized transformation coefficient, and the encoded entropy coefficient can be output as a 7400 bit stream. In order for the image encoder 7000 according to various embodiments to be applied to the image coding apparatus 150, the image encoder 7000 according to various embodiments may perform operations of each stage in each block. Figures 3A to 3C illustrate syntax structures of an encoding unit, a transformation tree, and a transformation unit, according to one embodiment. 3A, a coding unit syntax structure 200 of a coding unit level may include the syntax element cu_cbf 205. cu_cbf is a CBF of a coding unit. When a value thereof is 0, the image decoding apparatus 100 may determine that there is no transformation coefficient encoded in the luminance and chrominance component blocks of the coding unit. When a prediction mode (CupredMode[xO][yO]) of a current coding unit (xO, yO) is not an intra mode (MODE INTRA) (that is, when it is an Inter mode) (CuPredMode[xO][yO] != MODE_INTRA) and the value of a merge flag (merge_flag[xO][yO]) of the current coding unit (xO, yO) is 0, the image decoding apparatus 100 may QQoann / zznz / E / YiAi parse (ae(v)) cu_cbf 205 from a bitstream. In this sense, the merging flag is a flag that indicates whether a prediction mode of the current coding unit is a merging mode, and when its value is 0, it may indicate that the prediction mode of the current coding unit is not a merging mode but an internormal mode. When the prediction mode of the current coding unit is a hop mode, the image decoding apparatus 100 may not obtain a CBF (CBF for each component) including cu_cbf 205 from the bit stream. When the prediction mode of the current coding unit is the fusion mode, the image decoding apparatus 100 may not obtain cu_cbf 205 from the bit stream and may determine that its value is 1. However, when the prediction mode of the current coding unit is the fusion mode, the image decoding apparatus 100 may obtain CBF for each component except for cu_cbf 205 from the bit stream. When the prediction mode of the current coding unit is the intra mode, the image decoding apparatus 100 may not obtain cu_cbf 205 from the bit stream and may determine that its value is 1. However, when the prediction mode of the current coding unit is the intra mode, the image decoding apparatus 100 may obtain CBF for each component except for cu_cbf 205 from the bit stream. When the prediction mode of the current transformation unit is an intra mode, the image decoding apparatus 100 may perform intra prediction on each of the coding units. When a value of cu_cbf is 1 (if (cu_cbf)), the image decoding apparatus 100 may obtain CBF information in units of sub-blocks from the bit stream. Based on whether a sub-block transformation (SBT) technique is enabled (sps_sbt_enabled_flag) and a size (cbWdith, cbHeight) of the current coding unit and a maximum size (MaxSbtSize) of a coding unit used in the SBT technique, the image decoding apparatus 100 may determine whether the current coding unit uses the SBT technique (cu_sbt_flag), and when the current coding unit uses the SBT technique, the image decoding apparatus 100 may determine whether 1 / 4 split, 3 / 4 split, or 1 / 2 split is performed on a current block (cu_sbt_quad_flag), may determine whether to horizontally or vertically split the current block (cu_sbt_horizontal_flag), and may determine a sub-block to be actually transformed from among sub-blocks generated from the split. ((cu_sbt_pos_flag). Subsequently, the image decoding apparatus 100 may obtain a transformation tree syntax structure. In this regard, a size (tbWidth, tbHeight) of a transformation tree may be determined to be equal to the size (cbWidth, cbHeight) of the current coding unit. That is, the transformation tree syntax structure may be a syntax structure for determining at least one transformation unit from the current coding unit. 3B , when an intra-subpartition split type of the current coding unit is NO_ISP_SPLIT (i.e., when an intra-subpartition (ISP) technique is not used for the current coding unit), the image decoding apparatus 100 may recursively obtain the transformation tree syntax structure by comparing the size (tbWidth, tbHeight) of the transformation tree with a maximum size (MaxTBSizeY) of a luminance transformation block, or may obtain the transformation tree syntax structure without the recursive obtaining, thereby determining at least one transformation unit of the current coding unit. That is, the image decoding apparatus 100 may obtain a syntax structure of the at least one transformation unit. For example, when the current coding unit size is 128 x 128, it can be determined that a transformation unit consists of four 64 x 64 sub-blocks. When the SBT technique is used for the current coding unit (otherwise (cu sbt flag)), the image decoding apparatus 100 may divide the current coding unit into two sub-blocks, and the transformation unit may be determined to be the two sub-blocks. In this regard, a transformation coefficient encoded with respect to a single sub-block may exist between the two sub-blocks. When the SBT technique is used for the current coding unit, the image decoding apparatus 100 may divide the current block into a plurality of sub-blocks corresponding to NumlntraSubPartitions in the horizontal or vertical direction, based on whether the intra-subpartition split type (IntraSubPartitionsSplitType) is horizontal (ISP_HOR_SPLIT) or vertical (ISP_VER_SPLIT), and the transformation unit may be determined to be the plurality of sub-blocks. For example, the transformation unit may be four sub-blocks separated from the current coding unit in the horizontal direction or the vertical direction. Referring to Figure 3C, the image decoding apparatus 100 may obtain syntax elements tu cbf luma 210 and tu cbf cb and tu cbf cr 215 from a bit stream, according to a predetermined condition with respect to a current transformation unit. tu_cbf_luma may indicate a CBF of a luminance component transformation block, and tu_cbf_cb and tu_cbf_cr may indicate CBF of a chromaticity component (cb, cr) transformation block. For example, when an ISP (intra-subpartition) technique is used for a current coding unit (IntraSubPartitionsSplitType != ISP_NO_SPLIT), with respect to the current coding unit, the image decoding apparatus 100 may obtain the tu cbf luma 210 of the bitstream when a current transformation block is a sub-block that is not a last sub-block in an instance of the luminance component, and may obtain the tu_cbf_cb and tu_cbf_cr 215 of the bitstream only when a current transformation block is a last sub-block in an instance of the chrominance component. Furthermore, when an SBT technique is used for a current coding unit (cu_sbt_flag), the image decoding apparatus 100 may obtain, from the bit stream, the tu_cbf_luma 210 and the tu_cbf_cb and tu_cbf_cr 215 for only one sub-block (a condition based on subTuIndex and cu_sbt_pos_flag) from among sub-blocks included in the current coding unit. Figures 4A and 4B illustrate syntax structures of an encoding unit and a transformation unit, according to one embodiment. QQoann / zznz / E / YiAi Referring to Figure 4A, the syntax structure of the coding unit 200 of a coding unit level may include cbf all 225. cbf all is a CBF (coded block flag) of a coding unit. When a value thereof is 0, the image decoding apparatus 100 may determine that there is no transformation coefficient encoded in blocks of luminance and chrominance components of the coding unit. When a prediction mode (CupredMode[xO][yO]) of a current coding unit (xO, yO) is not an intra mode (MODE_INTRA) (that is, when it is an inter mode) (CuPredMode[xO][yO]!=MODE—INTRA), the image decoding apparatus 100 may obtain cbf_all 225 from a bit stream. In this regard, the prediction mode of the current coding unit may not be a hop mode. The hopping mode may include a normal hopping mode, an affine hopping mode, and a motion vector difference (MMVD) merging hopping mode. The affine mode indicates a mode in which motion compensation based on an affine model is used in inter-prediction. The MMVD mode may indicate a mode in which, after a new motion vector candidate is generated by indexing a motion vector of a neighboring block and predetermined motion vector differences (MVDs), the motion information of the current coding unit is derived based on the motion vector candidate. When the prediction mode of the current coding unit is the jump mode, the image decoding apparatus 100 may not obtain CBFs (cbf_luma, cbf_cb, cbf_cr and the like) including cbf_all 225 from the bit stream. Furthermore, the prediction mode of the current coding unit may not be a blending mode. For example, the prediction mode of the current coding unit may be an inter-normal mode. When the prediction mode of the current coding unit is the blending mode, the image decoding apparatus 100 may not obtain cbf_all 225 from the bit stream and may determine its value to be 1. However, when the prediction mode of the current coding unit is the blending mode, the image decoding apparatus 100 may obtain, from the bit stream, cbf_luma, cbf_cb, cbf_cr and the like, except cbf_all. When the prediction mode of the current coding unit is the intra mode, the image decoding apparatus 100 may not obtain cbf_all 225 from the bit stream and may determine that its value is 1. However, when the prediction mode of the current coding unit is the intra mode, the image decoding apparatus 100 may obtain, from the bit stream, cbf_luma, cbf_cb, cbf_cr and the like except cbf all. When the prediction mode oapoz / zze / E / gala of the current coding unit is the intra mode, the image decoding apparatus 100 may perform intra prediction on each coding unit. When a value of cbf_all is 1, the image decoding apparatus 100 can obtain a transformation unit syntax structure from the bit stream. Referring to Figure 4B, a coding unit syntax structure 230 of a transformation unit level may include cbf_cb and cbf_cr 235 and cbf_luma 240. cbf_luma 240 may indicate a CBF of a luminance component transformation block and cbf_cb and cbf_cr 235 may indicate CBF of a chromatic component transformation block (cb, cr). The image decoding apparatus 100 may first obtain cbf_cb and cbf_cr 235 for a current transformation unit from a bit stream. In this regard, a tree type of the current coding unit may be a single tree type or a dual tree chrominance type. When the prediction mode of the current coding unit is an intra mode, the image decoding apparatus 100 can always obtain cbf_luma 240 from the bit stream, and when it is not the intra mode (that is, when it is an inter mode), the image decoding apparatus 100 can obtain cbf_luma 240 from the bit stream, except in the case of QQoann / zznz / E / YiAi that the values of cbf_cb and cbf_cr 235 are all 0. Figures 4C and 4D illustrate syntax structures of an encoding unit and a transformation unit, according to another embodiment. Referring to Figure 4C, a coding unit syntax structure 250 of a coding unit level may include cbf_all 255. When the prediction mode (CupredMode[xO][yO]) of a current coding unit (xO, yO) is not an intra mode (MODE_ INTRA) (that is, when it is an inter mode) (CuPredMode[xO][yO]!=MODE— INTRA), the image decoding apparatus 100 may obtain cbf_all 255 from a bit stream. When the prediction mode of the current coding unit is a blending mode, the image decoding apparatus 100 may not obtain CBFs (cbf_luma, cbf_cb, cbf_cr, and the like) including cbf all 225 of the bit stream. In this regard, the prediction mode of the current coding unit may not be a hopping mode. When the prediction mode of the current coding unit is the blending mode, the image decoding apparatus 100 may not obtain CBFs (cbf_luma, cbf_cb, cbf_cr, and the like) including cbf_all 255 of the bit stream. Alternatively, the prediction mode of the current coding unit may not be the fusion mode. For QQoann / zznz / E / YiAi For example, the prediction mode of the current coding unit may be a normal Inter mode. When the prediction mode of the current coding unit is the fusion mode, the image decoding apparatus 100 may not obtain cbf_all 255 from the bit stream and may determine its value to be 1. However, when the prediction mode of the current coding unit is the fusion mode, the image decoding apparatus 100 may obtain, from the bit stream, cbf_luma, cbf_cb, cbf_cr and the like except cbf_all. When the prediction mode of the current coding unit is the intra mode, the image decoding apparatus 100 may not obtain cbf all 255 from the bit stream and may determine that its value is 1. However, when the prediction mode of the current coding unit is the intra mode, the image decoding apparatus 100 may obtain, from the bit stream, cbf luma, cbf cb, cbf cr and the like except cbf_all. When the prediction mode of the current coding unit is the intra mode, the image decoding apparatus 100 may perform intra prediction on each coding unit. When a value of cbf all is 1, based on a width (log2CbWidth) and a height (log2CbHeight) of a current coding unit and a maximum size (i.e., 6) of a transformation unit, the decoding apparatus QQoann / zznz / E / YiAi images 100 may determine whether to split the current coding unit into transformation units (isSplit), may determine a size (log2TbWidth, log2TbHeight) of a transformation unit to be included in the current coding unit, based on a size (log2CbWidth, log2CbHeight) of the current coding unit, and may obtain a syntax structure of at least one transformation unit of the bit stream. That is, the image decoding apparatus 100 may determine at least one transformation unit of the current coding unit.For example, assuming that the size of the largest coding unit is 128 and the maximum size of the transformation unit is 64, when the size of the current coding unit is 128 x N (where N is a multiple of 2 that is less than 64) or N x 128, the current coding unit may be divided into at least one sub-block of N x 64 or 64 x N, and the image decoding apparatus 100 may determine that the sub-block is a transformation unit. Referring to Figure 4D, a coding unit syntax structure 2 60 of a transformation unit level may include cbf cb and cbf cr 265 and cbf luma 270. The image decoding apparatus 100 may first obtain cbf_cb and cbf_cr 265 for a transformation unit QQoann / zznz / E / YiAi current from a bit stream. In this regard, a tree type of the current coding unit (or current transformation unit) may be a single tree type or a dual tree chrominance type. The image decoding apparatus 100 may obtain cbf_luma 270 from the bit stream, based on whether the current coding unit is to be split (isSplit). For example, when the current coding unit is not to be divided and the prediction mode of the current coding unit is an intra mode, the image decoding apparatus 100 may obtain cbf_luma 270 from the bit stream, and when it is not the intra mode (that is, when it is an inter mode), the image decoding apparatus 100 may obtain cbf_luma 270 from the bit stream, except for the case where the values of cbf_cb and cbf_cr 265 are all 0. When the current coding unit is to be divided, the image decoding apparatus 100 may obtain cbf_luma 270 for the current transformation unit from the bit stream. In this regard, the image decoding apparatus 100 may obtain cbf_luma 270 from the bit stream regardless of whether ISP and SBT techniques are used. When the image decoding apparatus 100 obtains cbf_luma 270 and cbf_cb and cbf_cr 265 and all of them are not 0, the image decoding apparatus 100 may Qooann / zznz / E / YiAi get information related to SBT technique. In a case where the current transformation unit is a last sub-block among a plurality of sub-blocks included in the current coding unit, when the cbf_luma 270 values of previous sub-blocks are all 0, it is possible that cbf_luma 270 is not obtained from the bit stream and may always be determined to be 1. 4C , it is described that the image decoding apparatus 100 determines, without separate signaling, whether the current coding unit is to be split, based on the size (log2CbWidth, log2CbHeight) of the current coding unit and the maximum size of the transformation unit, but the description is not limited thereto, and thus may be determined based on a width and height, an area, a depth, or the like of the current coding unit. Alternatively, it may be explicitly signaled whether a current coding unit is to be split. For example, a depth may indicate a split level with respect to the current coding unit.For example, in a case where a second coding unit is generated by being divided from a first coding unit, when the area of the first coding unit is reduced to 1 / 2, the depth of the second coding unit may be increased by 1, and when the area of the first coding unit is reduced by 1 / 4 (for example, both end blocks generated when the second coding unit is divided into three or a block generated when the second coding unit is divided into four), the depth of the second coding unit may be increased by 2, but the description is not limited thereto, and therefore, a depth may be determined based on at least one of the width and the height of a coding unit. Figure 5 is a diagram for describing a process in which, when the size of the current coding unit is larger than a predetermined size, the image decoding apparatus 100 divides the current coding unit into a plurality of blocks and performs deblocking filtering at a boundary of the plurality of blocks. When the maximum size of a coding unit is different from the maximum size of a transformation unit, the image decoding apparatus 100 may perform reverse transformation by dividing a block of a larger coding unit into sub-blocks, each with the maximum size of the transformation unit. Alternatively, in another case, the image decoding apparatus 100 may divide the current coding unit into a plurality of prediction blocks and may perform predictions on the plurality of prediction blocks. In this case, if the image decoding apparatus 100 performs deblocking filtering at a boundary of a QQOonn / zznz / E / YiAi coding unit, the quality of the reconstructed image may degrade, or the BD bit rate performance may deteriorate. In this regard, BD bit rate performance is an index measuring image compression efficiency and can refer to a value measured based on the bit rate of an actual compressed image and the image quality (PSNR) of an image. Accordingly, with respect to a coding unit of a particular size, the image decoding apparatus 100 may perform deblocking filtering based on the prediction that not only a boundary of the coding unit but also an internal area of the coding unit will be divided and processed. In this regard, a block predicted to be divided and processed may be determined based on at least one of a width, a height, an area, and a depth of the block. The depth indicates a division level with respect to the block, and therefore, a size of the block may be derived by using the depth. Accordingly, the image decoding apparatus may determine, based on the depth, the block predicted to be divided and processed. For example, with reference to Figure 5, when the size of the current coding unit 280 is 128 x 128, the image decoding apparatus 100 may divide the current coding unit 280 into a plurality of blocks 285, each having a size of 64 x 64, and may perform deblocking filtering on a horizontal or vertical direction boundary 290 of the blocks 285. However, the size of the current coding unit 280 is not limited to a case of 128 x 128, and when the size of the current coding unit 280 is 128 x 64 or 64 x 128, the current coding unit 280 may be divided into a plurality of blocks, each of which has a size of 64 x 64. x64 and deblocking filtering can be performed on a horizontal or vertical direction boundary of the split blocks. Furthermore, one of ordinary skill in the art can understand that, when determining an edge type to which deblocking filtering is applied, the current coding unit 280 may be divided in a direction equal to the edge direction and deblocking filtering may be performed on a divided block boundary.For example, in a case where the size of the current coding unit 280 is 128 x 128, when a type of edge to which deblocking filtering is applied is an edge in a horizontal direction, the image decoding apparatus 100 may horizontally divide the current coding unit 280 into blocks each having a size of 128 x 64 and may perform deblocking filtering at a boundary of the blocks, and when the type of edge to which deblocking filtering is applied is an edge in a vertical direction, the image decoding apparatus 100 may vertically divide the current coding unit 280 into blocks each having a size of 64 x 128 and may perform deblocking filtering at a boundary of the blocks. The image decoding apparatus 100 and the image coding apparatus 150 according to various embodiments can efficiently and explicitly signal a coded block flag according to the coding unit size, via a bit stream. Furthermore, the image decoding apparatus 100 and the image coding apparatus 150 according to various embodiments can efficiently perform deblocking filtering according to the coding unit size, such that an improvement in the quality of a reconstructed image can be expected. The division of a coding unit according to one embodiment of the description will be described in detail below. An image can be divided into larger coding units. The size of each larger coding unit can be determined based on the information obtained from a bit stream. The shape of each larger coding unit can be a square of the same size. However, the description is not limited to this. In addition, a larger coding unit can be hierarchically divided into QQoann / zznz / E / YiAi coding units based on division shape mode information obtained from the bit stream. The division shape mode information may include at least information indicating whether division is to be performed, division direction information, and division type information. The division whether to perform information indicates whether a coding unit is to be divided. The division direction information indicates whether division is to be performed in a horizontal or vertical direction. The division type information indicates whether a coding unit is to be divided using binary division, triple division, or quadruple division. For convenience of description, in the description, it is assumed that the split shape mode information includes information indicating whether to perform splitting, split direction information, and split type information, but the description is not limited thereto. The image decoding apparatus 100 may obtain, from a bit stream, the split shape mode information as a container string. The image decoding apparatus 100 may determine whether to split a coding unit, a split direction, and a split type based on the container string. The coding unit may be equal to or smaller than the largest coding unit. For example, when the division shape mode information indicates that division is not to be performed, the coding unit has the same size as the largest coding unit. When the division shape mode information indicates that division is to be performed, the largest coding unit may be divided into coding units of lesser depth. When the division shape mode information about the coding units of lesser depth indicates division, the coding units of lesser depth may be divided into smaller coding units. However, the division of the image is not limited to this, and the largest coding unit and the coding unit may not be distinguishable. The division of the coding unit will be described in detail with reference to Figures 6 to 19. Furthermore, the coding unit can be divided into prediction units for image prediction. Each prediction unit can be equal to or smaller than the coding unit. Furthermore, the coding unit can be divided into transformation units for image transformation. Each transformation unit can be equal to or smaller than the coding unit. The shapes and sizes of the transformation unit and the prediction unit may not be related to each other. The coding unit can be distinguished from the prediction unit and QQoann / zznz / E / YiAi the transformation unit or the coding unit, the prediction unit, and the transformation unit may be equal to each other. The division of the prediction unit and the transformation unit may be carried out in the same manner as the division of the coding unit. The division of the coding unit will be described in detail with reference to Figures 6 to 19. A current block and a neighboring block in the description may indicate one of the larger coding units, the coding unit, the prediction unit, and the transformation unit. In addition, the current block of the current coding unit is a block that is currently being decoded or encoded, or a block that is currently being divided. The neighboring block may be a block reconstructed before the current block. The neighboring block may be spatially or temporally adjacent to the current block.The neighboring block can be located on one of the bottom left, left, top left, top, top right, right, bottom right sides of the current block. Figure 6 illustrates a process, performed by the image decoding apparatus 100, of determining at least one coding unit by dividing a current coding unit, according to an embodiment. A block shape may include 4N x 4N, 4N x 2N, 2N x 4N, 4N x N, or N x 4N. In this case, N may be a positive integer. Block shape information is information that indicates at least a shape, direction, a width-to-height ratio, or sizes of the coding unit. The shape of the coding unit may include a square and a non-square. When the lengths of the width and height of the coding unit are equal (that is, when the block shape of the coding unit is 4N x 4N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a square. The image decoding apparatus 100 may determine that the shape of the coding unit is non-square. When the lengths of the width and the height of the coding unit are different from each other (that is, when the block shape of the coding unit is 4N x 2N, 2N x 4N, 4N x N or N x 4N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a non-square shape. When the shape of the coding unit is non-square, the image decoding apparatus 100 may determine that the ratio of the width and the height in the block shape information of the coding unit is at least one of 1:2, 2:1, 1:4, 4:1, 1:8 or 8:1. Furthermore, the image decoding apparatus 100 may determine whether the coding unit is in a horizontal direction or a vertical direction, based on the length of the width and the length of the height of the coding unit.In addition, the image decoding apparatus 100 may determine the size of the coding unit, based on at least one of the length of the width, the length of the height or the area of the coding unit. According to one embodiment, the image decoding apparatus 100 may determine the shape of the coding unit by using the block shape information and may determine a method of dividing the coding unit by using the division shape mode information. That is, a method of dividing the coding unit indicated by the division shape mode information may be determined based on the block shape indicated by the block shape information used by the image decoding apparatus 100. The image decoding apparatus 100 may obtain the split shape mode information from a bit stream. However, the embodiment is not limited thereto, and the image decoding apparatus 100 and the image coding apparatus 150 may obtain pre-agreed split shape mode information based on the block shape information. The image decoding apparatus 100 may obtain the pre-agreed split shape mode information with respect to a larger coding unit or a smaller coding unit. For example, the image decoding apparatus 100 may determine that the split shape mode information with respect to the larger coding unit is a quadruple split.Furthermore, the image decoding apparatus 100 may determine that the split shape mode information with respect to the smaller coding unit is not for performing the split. In particular, the image decoding apparatus 100 may determine that the size of the larger coding unit is 256 x 256. The image decoding apparatus 100 may determine that the pre-agreed split shape mode information is a quadruple split. Quadruple split is a split shape mode in which both the width and height of the coding unit are bisected. The image decoding apparatus 100 may obtain a coding unit of a size of 128 x 128 from the larger coding unit of a size of 256 x 256, based on the split shape mode information.Furthermore, the image decoding apparatus 100 may determine that the size of the smallest coding unit is 4 x 4. The image decoding apparatus 100 may obtain division shape mode information indicating not to perform division with respect to the smallest coding unit. According to one embodiment, the image decoding apparatus 100 may use the block shape information indicating that the current coding unit is square in shape. For example, the image decoding apparatus 100 may determine whether to not divide a 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 mode information.6, when block shape information of a current coding unit 300 indicates a square shape, an image decoder 110 may not divide a coding unit 310a having the same size as the current coding unit 300, based on the division shape mode information indicating that division is not to be performed, or may determine divided coding units 310b, 310c, or 310d based on the division shape mode information indicating a predetermined division method. 6 , according to one embodiment, the image decoding apparatus 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in a vertical direction, based on division shape mode information indicating to perform division in a vertical direction. The image decoding apparatus 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in a horizontal direction, based on division shape mode information indicating to perform division in a horizontal direction. The image decoding apparatus 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in vertical and horizontal directions, based on division shape mode information indicating to perform division in vertical and horizontal directions.However, the methods for dividing the square coding unit are not limited to the aforementioned methods and may include various methods that may be indicated by the division shape mode information. The predetermined division methods for dividing the square coding unit will be described in detail below in relation to various embodiments. Figure 7 illustrates a process, performed by the image decoding apparatus 100, of determining at least one coding unit by dividing a non-square coding unit, according to an embodiment. According to one embodiment, the image decoding apparatus 100 may use block shape information indicating that a current coding unit has a non-square shape. The image decoding apparatus 100 may QQoann / zznz / E / YiAi determines whether not to split the current non-square coding unit or whether to split the current non-square coding unit by using a predetermined splitting method, based on splitting shape mode information. 7 , when block shape information of a current coding unit 400 or 450 indicates a non-square shape, the image decoding apparatus 100 may determine that a coding unit 410 or 460 has the same size as the current coding unit 400 or 450, based on division shape mode information indicating not to perform division, or may determine coding units 420a and 420b, 430a, 430b and 430c, 470a and 470b, or 480a, 480b and 480c to be divided based on division shape mode information indicating a predetermined division method.The default splitting methods for splitting a non-square coding unit will be described in detail below in relation to various modalities. According to one embodiment, the image decoding apparatus 100 may determine a method of dividing a coding unit by using the division shape mode information, and in this case, the division shape mode information may indicate the number of one or more coding units generated by dividing a coding unit. With reference to Figure 7 , when the division shape mode information indicates dividing the current coding unit 400 or 450 into two coding units, the image decoding apparatus 100 may determine two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450, when dividing the current coding unit 400 or 450 based on the division shape mode information. According to one embodiment, when the image decoding apparatus 100 divides the current non-square coding unit 400 or 450 based on the division shape mode information, the image decoding apparatus 100 may divide a current coding unit, considering the location of a long side of the current non-square coding unit 400 or 450. For example, the image decoding apparatus 100 may determine a plurality of coding units when dividing the current coding unit 400 or 450 by dividing a long side of the current coding unit 400 or 450, in consideration of the shape of the current coding unit 400 or 450. According to one embodiment, when the splitting shape mode information indicates to split (three-split) a coding unit into an odd number of blocks, the image decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450. For example, when the QQoann / zznz / E / YiAi splitting mode information indicates splitting the current coding unit 400 or 450 into three coding units, the image decoding apparatus 100 may split the current coding unit 400 or 450 into three coding units 430a, 430b and 430c or 480a, 480b and 480c. According to one embodiment, the ratio of the width and height of the current coding unit 400 or 450 may be 4:1 or 1:4. When the ratio of the width and height is 4:1, the block shape information may indicate a horizontal direction because the length of the width is longer than the length of the height. When the ratio of the width and height is 1:4, the block shape information may indicate a vertical direction because the length of the width is shorter than the length of the height. The image decoding apparatus 100 may determine to divide a current coding unit into the odd number of blocks, based on division shape mode information. Furthermore, the image decoding apparatus 100 may determine a division direction of the current coding unit 400 or 450, based on the block shape information of the current coding unit 400 or 450.For example, when the current coding unit 400 is in the vertical direction, the image decoding apparatus 100 may determine the coding units 430a, 430b, and 430c. QQoann / zznz / E / YiAi divide the current coding unit 400 in the horizontal direction. In addition, when the current coding unit 450 is in the horizontal direction, the image decoding apparatus 100 may determine the coding units 480a, 480b, and 480c by dividing the current coding unit 450 in the vertical direction. According to one embodiment, the image decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 400 or 450, and not all of the determined coding units may have the same size. For example, a predetermined coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, and 430c, or 480a, 480b, and 480c, may have a size different from the size of the other coding units 430a and 430c, or 480a and 480c. That is, the coding units that can be determined by dividing the current coding unit 400 or 450 may have various sizes, and in some cases, the entire odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes. According to one embodiment, when the division shape mode information indicates dividing the coding unit into the odd number of blocks, the image decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 400 or 450 and further, may place a predetermined restriction on at least one coding unit from among the odd number of coding units generated by dividing the current coding unit 400 or 450. Referring to FIG. 7 , the image decoding apparatus 100 may allow the decoding process of the coding unit 430b or 480b to be different from that of the other coding units 430a and 430c or 480a or 480c, wherein the coding unit 430b or 480b is at a central location among the three coding units 430a, 430b and 430c or 480a, 480b and 480c generated by dividing the current coding unit by 400 or 450.For example, the image decoding apparatus 100 may restrict the coding unit 430b or 480b at the center location to no longer be divided or to be divided only a predetermined number of times, unlike the other coding units 430a and 430c or 480a and 480c. Figure 8 illustrates a process, performed by the image decoding apparatus 100, of dividing a coding unit based on at least one of block shape information and division shape mode information, according to an embodiment. According to an embodiment, the image decoding apparatus 100 may determine to divide a first square coding unit 500 into coding units, based on at least one of the block shape information and the division shape mode information, or may determine not to divide the first square coding unit 500. According to an embodiment, when the division shape mode information indicates to divide the first coding unit 500 in a horizontal direction, the image decoding apparatus 100 may determine a second coding unit 510 when dividing the first coding unit 500 in a horizontal direction. A first coding unit, a second coding unit, and a third coding unit used according to an embodiment are terms used to understand a relationship before and after dividing a coding unit.For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the structure of the first coding unit, the second coding unit, and the third coding unit follows the above descriptions. According to an embodiment, the image decoding apparatus 100 may determine to divide the determined second coding unit 510 into coding units, based on at least one of the block shape information and the division shape mode information, or may determine not to divide the determined second coding unit 510. Referring to Figure 5, the image decoding apparatus 100 may divide the second non-square coding unit 510, which is determined by dividing the first coding unit 500, into one or more third coding units 520a or 520b, 520c and 520d by at least one of the block shape information and the division shape mode information or may not divide the second non-square coding unit 510.The image decoding apparatus 100 may obtain at least one of the block shape information and the split shape mode information, and may split a plurality of second coding units in various ways (e.g., 510) by splitting the first coding unit 500, based on at least one of the obtained block shape information and the obtained split shape mode information, and the second coding unit 510 may be split by using a method of splitting the first coding unit 500 based on at least one of the block shape information and the split shape mode information.According to an embodiment, when the first coding unit 500 is divided into the second coding units 510 based on at least one of the block shape information and the split shape mode information about the first coding unit 500, the second coding unit 510 may also be divided into the third coding units 520a or 520b, 520c and 520d based on at least one of the block shape information and the split shape mode information about the second coding unit 510. That is, a coding unit may be recursively divided based on at least one of block shape information and split shape mode information about each coding unit.Therefore, a square coding unit can be determined by dividing a non-square coding unit and a non-square coding unit can be determined by recursively dividing the square coding unit. 8 , a predetermined coding unit (e.g., a centrally located coding unit or a square coding unit) among the odd number of third coding units 520b, 520c, and 520d determined by dividing the second non-square coding unit 510 may be recursively divided. According to one embodiment, the third non-square coding unit 520b among the odd number of third coding units 520b, 520c, and 520d may be divided in a horizontal direction into a plurality of fourth coding units. A fourth non-square coding unit 530b or 530d among a plurality of fourth coding units 530a, 530b, 530c, and 530d may be further divided into a plurality of coding units.For example, the fourth non-square coding unit 530b or 530d can be further divided into the odd number of coding units. Next, a method that can be used to recursively divide a coding unit with respect to several modalities will be described. According to one embodiment, the image decoding apparatus 100 may divide each of the third coding units 520a or 520b, 520c, and 520d into coding units based on at least one of block shape information and split shape mode information. Furthermore, the image decoding apparatus 100 may determine not to divide the second coding unit 510 based on at least one of block shape information and split shape mode information. According to one embodiment, the image decoding apparatus 100 may divide the second non-square coding unit 510 into the odd number of third coding units 520b, 520c, and 520d. The image decoding apparatus 100 may place a predetermined restriction on a predetermined third coding unit from among the odd number of third coding units 520b, 520c, and 520d.For example, the image decoding apparatus 100 may restrict the third coding unit 520c to a central location among the odd number of third coding units 520b, 520c, and 520d so that it is no longer divided or. QQoann / zznz / E / YiAi splits an adjustable number of times. 8, the image decoding apparatus 100 may restrict the third coding unit 520c, which is at the center location among the odd number of third coding units 520b, 520c, and 520d included in the second non-square coding unit 510, to no longer be divided, to be divided by using a predetermined division method (for example, to be divided into only four coding units, or to be divided using a division method of the second coding unit 510), or to be divided only a predetermined number of times (for example, to be divided only n times (where n > 0)).However, the restrictions on the third coding unit 520c at the central location are not limited to the aforementioned examples, and it should be construed that the restrictions may include various restrictions for decoding the third coding unit 520c at the central location differently from the other third coding units 520b and 520d. According to one embodiment, the image decoding apparatus 100 may obtain at least one of block shape information and split shape mode information, which is used to split a current coding unit, from a predetermined location in the coding unit. QQoann / zznz / E / YiAi current. Figure 9 illustrates a method, performed by the image decoding apparatus 100, for determining a predetermined coding unit from an odd number of coding units, according to an embodiment. 9 , at least one of block shape information and slice shape mode information about a current coding unit 600 or 650 may be obtained from a sample at a predetermined location (e.g., a sample 640 or 690 at a center location) among a plurality of samples included in the current coding unit 600 or 650. However, the predetermined location in the current coding unit 600, from which the at least one of block shape information and slice shape mode information may be obtained, is not limited to the center location in FIG. 6 and may include a plurality of locations included in the current coding unit 600 (e.g., upper, lower, left, right, upper left, lower left, upper right, and lower right locations).The image decoding apparatus 100 may obtain at least one of the block shape information and the splitting shape mode information from the predetermined location and may determine whether to split or not split the current coding unit into coding units of various shapes and sizes. According to one embodiment, when the current coding unit is divided into a predetermined number of coding units, the image decoding apparatus 100 may select one of the coding units. Various methods may be used to select one of a plurality of coding units, as will be described below in relation to various embodiments. According to one embodiment, the image decoding apparatus 100 may divide the current coding unit into a plurality of coding units and may determine a coding unit at a predetermined location.According to one embodiment, the image decoding apparatus 100 may use information indicating locations of the odd number of coding units, to determine a coding unit at a central location among the odd number of coding units. 9 , the image decoding apparatus 100 may determine the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The image decoding apparatus 100 may determine the middle coding unit 620b or the middle coding unit 660b by using information about the locations of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c.For example, the image decoding apparatus 100 may determine the coding unit 620b at the center location by determining the locations of the coding units 620a, 620b, and 620c based on information indicating locations of predetermined samples included in the coding units 620a, 620b, and 620c. In detail, the image decoding apparatus 100 may determine the coding unit 620b at the center location by determining the locations of the coding units 620a, 620b, and 620c based on information indicating upper-left sample locations 630a, 630b, and 630c of the coding units 620a, 620b, and 620c. According to one embodiment, the information indicating the locations of the top-left samples 630a, 630b and 630c, which are included in the coding units 620a, 620b and 620c, respectively, may include information about locations or coordinates of the coding units 620a, 620b and 620c in an image. According to one embodiment, the information indicating the locations of the upper-left samples 630a, 630b and 630c, which are included in the coding units 620a, 620b and 620c, respectively, may include information indicating widths or heights of the coding units 620a, 620b and 620c included in the current coding unit 600, and the widths or heights may correspond to information indicating differences between the coordinates of the coding units 620a, 620b and 620c in the image.That is, the image decoding apparatus 100 can determine the coding unit 620b at the center location by directly using information about the locations or coordinates of the coding units 620a, 620b, and 620c in the image or by using information about the widths or heights of the coding units, which correspond to the difference values between the coordinates. According to one embodiment, the information indicating the location of the upper left sample 630a of the upper coding unit 620a may include coordinates (xa, ya), information indicating the location of the upper left sample 630b of the middle coding unit 620b may include coordinates (xb, yb), and information indicating the location of the upper left sample 630c of the lower coding unit 620c may include coordinates (xc, ye). The image decoding apparatus 100 may determine the middle coding unit 620b by using the coordinates of the upper left samples 630a, 630b, and 630c that are included in the coding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the top-left samples 630a, 630b and οοοαηη / ζζηζ / Ε / γίΛΐ 630c are sorted in ascending or descending order, the coding unit 620b including coordinates (xb, yb) of the sample 630b at a center location may be determined as a coding unit at a center location from among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the locations of the upper-left samples 630a, 630b, and 630c may include coordinates indicating absolute locations in the image, or may use coordinates (dxb, dyb) indicating a relative location of the upper-left sample 630b of the middle coding unit 620b, and coordinates (dxc, dyc) indicating the relative location of the upper-left sample 630c of the lower coding unit 620c with reference to the location of the upper-left sample 630a of the upper coding unit 620a.A method for determining a coding unit at a predetermined location by using coordinates of a sample included in the coding unit as information indicating the location of the sample is not limited to the aforementioned method and may include various arithmetic methods capable of using the coordinates of the sample. According to one embodiment, the image decoding apparatus 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b and 620c. QQoann / zznz / E / YiAi 100 620c and may select one of the coding units 620a, 620b, and 620c based on a predetermined criterion. For example, the image decoding apparatus 100 may select the coding unit 620b, which has a size different from that of the others, from among the coding units 620a, 620b, and 620c. According to one embodiment, the image decoding apparatus 100 may determine the width or height of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya) which is information indicating the location of the upper-left sample 630a of the upper coding unit 620a, the coordinates (xb, yb) which is information indicating the location of the upper-left sample 630b of the middle coding unit 620b, and the coordinates (xc, ye) which is information indicating the location of the upper-left sample 630c of the lower coding unit 620c. The image decoding apparatus 100 may determine the respective sizes of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, ye) indicating the locations of the coding units 620a, 620b, and 620c.According to one embodiment, the image decoding apparatus 100 may determine that the width of the upper coding unit 620a is the width of the current coding unit 600. The decoding apparatus. 101 images 100 may determine that the height of the upper coding unit 620a is yb-ya. According to one embodiment, the image decoding apparatus 100 may determine that the width of the middle coding unit 620b is the width of the current coding unit 600. The image decoding apparatus 100 may determine that the height of the intermediate coding unit 620b is yc-yb. According to one embodiment, the image decoding apparatus 100 may determine the width or height of the lower coding unit 620c by using the width or height of the current coding unit 600 or the widths or heights of the upper and middle coding units 620a and 620b. The image decoding apparatus 100 may determine a coding unit, which has a size different from that of the others, based on the determined widths and heights of the coding units 620a, 620b and 620c.Referring to Figure 9, the image decoding apparatus 100 may determine the middle coding unit 620b, which has a size different from the size of the upper and lower coding units 620a and 620c, as the coding unit of the predetermined location. However, the aforementioned method, performed by the image decoding apparatus 100, to determine a coding unit having a size different from the size of the other coding units, merely corresponds. 102 to an example for determining a coding unit at a predetermined location by using the sizes of coding units, which are determined based on sample coordinates, and thus various methods can be used to determine a coding unit at a predetermined location by comparing the sizes of coding units, which are determined based on predetermined sample coordinates. The image decoding apparatus 100 may determine the width or height of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd) which is information indicating the location of an upper-left sample 670a of the left coding unit 660a, the coordinates (xe, ye) which is information indicating the location of an upper-left sample 670b of the middle coding unit 660b, and the coordinates (xf, yf) which is information indicating the location of the upper-left sample 670c of the right coding unit 660c. The image decoding apparatus 100 may determine the respective sizes of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the locations of the coding units 660a, 660b, and 660c. According to one embodiment, the image decoding apparatus 100 may determine that the width of the left coding unit 660a is xe-xd. The image decoding apparatus 100 may 103 image decoding apparatus 100 may determine that the height of the left coding unit 660a is the height of the current coding unit 650. According to one embodiment, the image decoding apparatus 100 may determine that the width of the middle coding unit 660b is xf-xe. The image decoding apparatus 100 may determine that the height of the middle coding unit 660b is the height of the current coding unit 650. According to one embodiment, the image decoding apparatus 100 may determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 or the widths or heights of the left and middle coding units 660a and 660b.The image decoding apparatus 100 may determine a coding unit having a size different from that of the others based on the determined widths and heights of the coding units 660a, 660b, and 660c. Referring to FIG. 9, the image decoding apparatus 100 may determine the middle coding unit 660b having a size different from the sizes of the left and right coding units 660a and 660c as the coding unit of the predetermined location. However, the aforementioned method performed by the image decoding apparatus 100 for determining a coding unit having a size different from the size. QQOonn / zznz / E / YiAi 104 of the other coding units, it simply corresponds to an example for determining a coding unit at a predetermined location by using the coding unit sizes, which are determined based on sample coordinates, and therefore various methods for determining a coding unit at a predetermined location by comparing the coding unit sizes, which are determined based on predetermined sample coordinates. However, the sample locations considered to determine coding unit locations are not limited to the upper-left locations mentioned above, and information about arbitrary sample locations included in the coding units can be used. According to one embodiment, the image decoding apparatus 100 may select a coding unit at a predetermined location from among an odd number of coding units determined by dividing the current coding unit, in consideration of the shape of the current coding unit. For example, when the current coding unit has a non-square shape, the width of which is greater than its height, the image decoding apparatus 100 may determine the coding unit at the predetermined location in a horizontal direction. That is, the image decoding apparatus 100 may determine 105 one of the coding units at different locations in a horizontal direction and may impose a restriction on the coding unit. When the current coding unit has a non-square shape, the height of which is greater than its width, the image decoding apparatus 100 may determine the coding unit at the predetermined location in a vertical direction. That is, the image decoding apparatus 100 may determine one of the coding units at different locations in a vertical direction and may impose a restriction on the coding unit. According to one embodiment, the image decoding apparatus 100 may use information indicating respective locations of an even number of coding units to determine the coding unit at the predetermined location from among the even number of coding units. The image decoding apparatus 100 may determine an even number of coding units by dividing (binary division) the current coding unit, and may determine the coding unit at the predetermined location by using information about the locations of the even number of coding units. An operation related thereto may correspond to the operation of determining a coding unit at a predetermined location (e.g., a center location) from among 106 an odd number of coding units, which is described in detail above with reference to Figure 6 and therefore detailed descriptions thereof are not provided herein. According to one embodiment, when a current non-square coding unit is divided into a plurality of coding units, predetermined information about a coding unit at a predetermined location may be used in a division process to determine the coding unit at the predetermined location from among the plurality of coding units. For example, the image decoding apparatus 100 may use at least one of block shape information and division shape mode information, which is stored in a sample included in a middle coding unit, in a division process to determine a coding unit at a center location from among the plurality of coding units determined by dividing the current coding unit. 9 , the image decoding apparatus 100 may divide the current coding unit 600 into the plurality of coding units 620a, 620b, and 620c based on at least one of the block shape information and the split shape mode information, and may QQoann / zznz / E / YiAi determine the coding unit 620b at a location 107 central from among the plurality of coding units 620a, 620b and 620c. In addition, the image decoding apparatus 100 may determine the coding unit 620b at the central location, in consideration of a location from which, based on at least one of the block shape information and the division shape mode information, is obtained.That is, at least one of the block shape information and the split shape mode information about the current coding unit 600 may be obtained from the sample 640 at a central location of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on at least one of the block shape information and the split shape mode information, the coding unit 620b including the sample 640 may be determined as the coding unit at the central location. However, the information used to determine the coding unit at the central location is not limited to at least one of block shape information and split shape mode information, and various types of information may be used to determine the coding unit at the central location. According to one embodiment, predetermined information may be obtained to identify the coding unit at the predetermined location of a predetermined sample. 108 included in a coding unit to be determined. Referring to Fig. 9, the image decoding apparatus 100 may use at least one of the block shape information and the partition shape mode information obtained from a sample at a predetermined location in the current coding unit 600 (for example, a sample at a center location of the current coding unit 600), to determine a coding unit at a predetermined location among the plurality of coding units 620a, 620b, and 620c determined by partitioning the current coding unit 600 (for example, a coding unit at a center location among a plurality of partitioned coding units).That is, the image decoding apparatus 100 may determine the sample at the predetermined location by considering the block shape of the current coding unit 600, may determine the coding unit 620b including a sample, from which predetermined information (for example, at least one of the block shape information and the splitting shape mode information) may be obtained, from the plurality of coding units 620a, 620b, and 620c determined by splitting the current coding unit 600, and may place a predetermined restriction on the coding unit 620b. Referring to FIG. 9 , according to one embodiment, the image decoding apparatus 100 may. QQoann / zznz / E / YiAi 109 determining the sample 640 at the central location of the current coding unit 600 as the sample from which the predetermined information can be obtained, and may place a predetermined restriction on the coding unit 620b including the sample 640, in a decoding operation. However, the sample location from which the predetermined information can be obtained is not limited to the aforementioned location and may include arbitrary locations of samples included in the coding unit 620b to be determined for a restriction. According to one embodiment, the location of the sample from which the predetermined information can be obtained can be determined based on the shape of the current coding unit 600. According to one embodiment, the block shape information may indicate whether the current coding unit is square-shaped or non-square-shaped, and the location of the sample from which the predetermined information can be obtained can be determined based on the shape. For example, the image decoding apparatus 100 may determine a sample located at a boundary for dividing at least one of a width and height of the current coding unit in half as the sample from which the predetermined information can be obtained by using at least one of information about the width of the coding unit. QQoann / zznz / E / YiAi current encoding and height information 110 current coding unit. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding apparatus 100 may determine one of samples adjacent to a boundary for dividing a long side of the current coding unit in half, as the sample from which the predetermined information can be obtained. According to one embodiment, when the current coding unit is divided into a plurality of coding units, the image decoding apparatus 100 may use at least one of the block shape information and the division shape mode information to determine a coding unit at a predetermined location among the plurality of coding units.According to one embodiment, the image decoding apparatus 100 may obtain at least one of the block shape information and the split shape mode information from a sample at a predetermined location in a coding unit, and may divide the plurality of coding units generated by dividing the current coding unit by using at least one of the block shape information and the split shape mode information obtained from the sample at the predetermined location in each of the plurality of coding units. That is, a coding unit. QQoann / zznz / E / YiAi may be recursively split based on at least one of the block shape information and the split shape mode information, which is obtained from the sample at the predetermined location in each coding unit. A recursive splitting operation of a coding unit is described above with reference to FIG. 8 , and therefore, detailed descriptions thereof are not provided herein. According to one embodiment, the image decoding apparatus 100 may determine one or more coding units by dividing the current coding unit and may determine the decoding order of the one or more coding units, based on a predetermined block (e.g., the current coding unit). Figure 10 illustrates the processing order of a plurality of coding units when the image decoding apparatus 100 determines the plurality of coding units by dividing a current coding unit, according to an embodiment. According to one embodiment, the image decoding apparatus 100 may determine second coding units 710a and 710b by dividing a first coding unit 700 in a vertical direction, may determine second coding units 730a and 730b by dividing the first coding unit 700 in a horizontal direction. QQoann / zznz / E / YiAi 112 or may determine second coding units 750a to 750d by dividing the first coding unit 700 in vertical and horizontal directions, based on at least one of block shape information and division shape mode information. Referring to Figure 10, the image decoding apparatus 100 may determine to process the second coding units 710a and 710b in a horizontal direction order 710c, the second coding units 710a and 710b are determined by dividing the first coding unit 700 in a vertical direction. The image decoding apparatus 100 may determine to process the second coding units 730a and 730b in a vertical direction order 730c, the second coding units 730a and 730b are determined by dividing the first coding unit 700 in a horizontal direction.The image decoding apparatus 100 may determine the second coding units 750a, 750b, 750c, and 750d, which are determined by dividing the first coding unit 700 in vertical and horizontal directions, according to a predetermined order (for example, in a raster scan order or Z-scan order 750e) by which the coding units are processed in a row and then the coding units are processed in a next row. According to one embodiment, the decoding apparatus QQoann / zznz / E / YiAi 113 of images 100 may recursively divide coding units. With reference to Figure 10, the image decoding apparatus 100 may determine the plurality of coding units 710a and 710b, 730a and 730b or 750a, 750b, 750c and 750d when dividing the first coding unit 700 and may recursively divide each of the determined plurality of coding units 710a and 710b, 730a and 730b or 750a, 750b, 750c and 750d. A method of dividing the plurality of coding units 710a and 710b, 730a and 730b or 750a, 750b, 750c and 750d may correspond to a method of dividing the first coding unit 700. Accordingly, each of the plurality of coding units 710a and 710b, 730a and 730b or 750a, 750b, 750c and 750d may be independently divided into a plurality of coding units.Referring to Figure 10, the image decoding apparatus 100 may determine the second coding units 710a and 710b by dividing the first coding unit 700 in a vertical direction and may determine whether to independently divide each of the second coding units 710a and 710b or not to divide the second coding units 710a and 710b. According to one embodiment, the image decoding apparatus 100 may determine third coding units 720a and 720b by dividing the second left coding unit 710a in a horizontal direction and may 114 do not split the second right coding unit 710b. According to one embodiment, the processing order of the coding units may be determined based on a division operation of a coding unit. In other words, the processing order of the divided coding units may be determined based on a processing order of the coding units immediately before being divided. The image decoding apparatus 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the second left coding unit 710a, independently of the second right coding unit 710b. Because the third coding units 720a and 720b are determined by dividing the second left coding unit 710a in a horizontal direction, the third coding units 720a and 720b may be processed in a vertical direction order 720c.Because the second left and right coding units 710a and 710b are processed in the horizontal direction order 710c, the second right coding unit 710b may be processed after the third coding units 720a and 720b included in the second left coding unit 710a are processed in the vertical direction order 720c. It should be understood that the operation of determining a processing order of coding units based on a. QQoann / zznz / E / YiAi 115 coding unit before being split is not limited to the above-mentioned example and various methods can be used to independently process coding units, which are split and determined in various ways, in a predetermined order. Figure 11 illustrates a process, performed by the image decoding apparatus 100, for determining 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 predetermined order, according to an embodiment. According to one embodiment, the image decoding apparatus 100 may determine that the current coding unit is to be divided into an odd number of coding units, based on obtained block shape information and the division shape mode information. With reference to Figure 11, a first square coding unit 800 may be divided into second non-square coding units 810a and 810b and the second coding units 810a and 810b may be independently divided into third coding units 820a and 820b and 820c, 820d and 820e. According to one embodiment, the image decoding apparatus 100 may determine the plurality of third coding units 820a and 820b by dividing the left second coding unit 810a into QQoann / zznz / E / YiAi 116 a horizontal direction and may divide the second right coding unit 810b into the odd number of third coding units. 820c, 820d and 820e. According to one embodiment, the image decoding apparatus 100 may determine whether there is an odd number of divided coding units by determining whether the third coding units 820a and 820b and 820c, 820d and 820e are processable in a predetermined order. 11 , the image decoding apparatus 100 may determine the third coding units 820a and 820b and 820c, 820d and 820e by recursively dividing the first coding unit 800. The image decoding apparatus 100 may determine whether any of the first coding units 800, the second coding units 810a and 810b, or the third coding units 820a and 820b and 820c, 820d and 820e is to be divided into an odd number of coding units, based on at least one of the block shape information and the split shape mode information.For example, the second coding unit 810b located to the right of the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of a plurality of coding units included in the first coding unit 800 may be in an order of [number of] / [number of] / [number of] [number of]. 117 predetermined (for example, a Z-scan order 830) and the image decoding apparatus 100 can determine whether the third coding units 820c, 820d and 820e, which are determined by dividing the second right coding unit 810b into an odd number of coding units, satisfy a processing condition in the predetermined order. According to one embodiment, the image decoding apparatus 100 may determine whether the third coding units 820a and 820b and 820c, 820d and 820e included in the first coding unit 800 satisfy the processing condition in the predetermined order, and the condition concerns whether at least one of the width and height of the second coding units 810a and 810b is to be halved along a boundary of the third coding units 820a and 820b and 820c, 820d and 820e. For example, the third coding units 820a and 820b determined when the height of the non-square-shaped second left coding unit 810a is halved may satisfy the condition.It can be determined that the third coding units 820c, 820d and 820e do not satisfy the condition because the boundaries of the third coding units 820c, 820d and 820e determined when the second right coding unit 810b is divided into three coding units cannot. QQoann / zznz / E / YiAi 118 dividing the width or height of the second right coding unit 810b in half. When the condition is not satisfied, as described above, the image decoding apparatus 100 may determine disconnection of a scanning command and may determine that the second right coding unit 810b is to be divided into an odd number of coding units, based on the result of the determination. According to one embodiment, when a coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may place a predetermined restriction on a coding unit at a predetermined location among the divided coding units. The restriction or the predetermined location is described above in connection with various embodiments, and therefore, detailed descriptions thereof are not provided herein. Figure 12 illustrates a process, performed by the image decoding apparatus 100, for determining at least one coding unit by dividing a first coding unit 900, according to an embodiment. According to an embodiment, the image decoding apparatus 100 may divide the first coding unit 900, based on at least one of block shape information and division shape mode information that is obtained through the obtaining device 105. The first coding unit 900 may be divided into two parts: 119 square coding unit 900 may be divided into four square coding units or may be divided into a plurality of non-square coding units. For example, with reference to FIG. 12 , when the block shape information indicates that the first coding unit 900 is square and the partitioning shape mode information indicates dividing the first coding unit 900 into non-square coding units, the image decoding apparatus 100 may divide the first coding unit 900 into a plurality of non-square coding units.In detail, when the division shape mode information indicates determining an odd number of coding units by dividing the first coding unit 900 in a horizontal direction or a vertical direction, the image decoding apparatus 100 may divide the first square coding unit 900 into an odd number of coding units, for example, second coding units 910a, 910b and 910c determined by dividing the first square coding unit 900 in a vertical direction or second coding units 920a, 920b and 920c determined by dividing the first square coding unit 900 in a horizontal direction. According to one embodiment, the image decoding apparatus 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the image decoding apparatus 100 are 120 The first coding unit 900 satisfy a condition for processing in a predetermined order, and the condition concerns whether at least one of the width and height of the first coding unit 900 is to be divided in half along a boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to FIG. 12, because the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the first square coding unit 900 in a vertical direction do not divide the width of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not satisfy the condition for processing in the predetermined order.Furthermore, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the first square coding unit 900 in a horizontal direction do not divide the height of the first coding unit 900 in half, it may be determined that the first coding unit 900 does not satisfy the condition of processing in the predetermined order. When the condition is not satisfied, as described above, the image decoding apparatus 100 may determine disconnection from a scanning order and may determine that the first coding unit 900 is divided into an odd number of units. 121 coding, based on the determination result. According to one embodiment, when a coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may place a predetermined restriction on a coding unit at a predetermined location among the divided coding units. The restriction or predetermined location is described above in connection with various embodiments, and therefore, detailed descriptions thereof are not provided herein. According to one embodiment, the image decoding apparatus 100 may determine coding units in various ways by dividing a first coding unit. Referring to Figure 12, the image decoding apparatus 100 may divide the first square coding unit 900 or a first non-square coding unit 930 or 950 into coding units of various shapes. Figure 13 illustrates that a shape into which a second coding unit can be divided is restricted when the second coding unit having a non-square shape, which is determined when the image decoding apparatus 100 divides a first coding unit 1000, satisfies a predetermined condition, according to an embodiment. 122 According to an embodiment, the image decoding apparatus 100 may determine to divide the first square coding unit 1000 into second non-square coding units 1010a and 1010b or 1020a and 1020b, based on at least one of block shape information and division shape mode information obtained by the obtaining device 105. The second coding units 1010a and 1010b or 1020a and 1020b may be divided independently. Accordingly, the image decoding apparatus 100 may determine whether to divide or not divide each of the second coding units 1010a and 1010b or 1020a and 1020b into a plurality of coding units, based on at least one of block shape information and division shape mode information about each of the second coding units 1010a and 1010b or 1020a and 1020b.According to one embodiment, the image decoding apparatus 100 may determine third coding units 1012a and 1012b by dividing the second non-square left coding unit 1010a, which is determined by dividing the first coding unit 1000 in a vertical direction, in a horizontal direction. However, when the second left coding unit 1010a is divided in a horizontal direction, the image decoding apparatus 100 may restrict the second right coding unit 1010b from being divided into squares. 123 a horizontal direction in which the second left coding unit 1010a is divided. When the third coding units 1014a and 1014b are determined by dividing the second right coding unit 1010b in the same direction, because the second left coding unit 1010a and the second right coding unit 1010b are independently divided in a horizontal direction, the third coding units 1012a, 1012b or 1014a and 1014b can be determined. However, this case also serves as a case in which the image decoding apparatus 100 divides the first coding unit 1000 into four second square coding units 1030a, 1030b, 1030c and 1030d, based on at least one of the block shape information and the division shape mode information and may be inefficient in terms of image decoding. According to one embodiment, the image decoding apparatus 100 may determine third coding units 1022a and 1022b or 1024a and 1024b by dividing the second non-square coding unit 1020a or 1020b, which is determined by dividing the first coding unit 1000 in a horizontal direction, in a vertical direction. However, when a second coding unit (e.g., the upper second coding unit 1020a) is divided in a vertical direction, for the aforementioned reason, the 124 Image decoding apparatus 100 may restrict the other second coding unit (for example, the second lower coding unit 1020b) from being divided in a vertical direction in which the second upper coding unit 1020a is divided. Figure 14 illustrates a process, performed by the image decoding apparatus 100, of dividing a square coding unit, when the division shape mode information indicates that the square coding unit will not be divided into four square coding units, according to an embodiment. According to one embodiment, the image decoding apparatus 100 may determine second coding units 1110a and 1110b or 1120a and 1120b, etc. when dividing a first coding unit 1100, based on at least one of block shape information and division shape mode information. The division shape mode information may include information about various methods for dividing a coding unit, but the information about various division methods may not include information for dividing a coding unit into four square coding units. Based on the division shape mode information, the image decoding apparatus 100 does not divide the first square coding unit 1100 into four second coding units. QQoann / zznz / E / YiAi 125 square coding units 1130a, 1130b, 1130c, and 1130d. The image decoding apparatus 100 may determine the second non-square coding units 1110a and 1110b or 1120a and 1120b, etc., based on the splitting shape mode information. According to one embodiment, the image decoding apparatus 100 may independently divide the second non-square coding units 1110a and 1110b or 1120a and 1120b, etc. Each of the second coding units 1110a and 1110b or 1120a and 1120b, etc. may be recursively divided in a predetermined order, and this dividing method may correspond to a method of dividing the first coding unit 1100, based on at least one of the block shape information and the division shape mode information. For example, the image decoding apparatus 100 may determine third square coding units 1112a and 1112b by dividing the second left coding unit 1110a in a horizontal direction, and may determine third square coding units 1114a and 1114b by dividing the second right coding unit 1110b in a horizontal direction. In addition, the image decoding apparatus 100 may determine third square coding units 1116a, 1116b, 1116c, and 1116d by dividing both the second left coding unit 1110a and the second right coding unit 1110b. 126 right coding unit 1110b in a horizontal direction. In this case, coding units can be determined that have the same shape as the four second square coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100. As another example, the image decoding apparatus 100 may determine third square coding units 1122a and 1122b by dividing the second upper coding unit 1120a in a vertical direction and may determine third square coding units 1124a and 1124b by dividing the second lower coding unit 1120b in a vertical direction. Furthermore, the image decoding apparatus 100 may determine third square coding units 1126a, 1126b, 1126c, and 1126d by dividing both the second upper coding unit 1120a and the second lower coding unit 1120b in a vertical direction. In this case, coding units can be determined that have the same shape as the four second square coding units 1130a, 1130b, 1130c and 1130d divided from the first coding unit 1100. Figure 15 illustrates that the processing order among a plurality of coding units may be changed depending on a division process of a coding unit, according to an embodiment. QQOonn / zznz / E / YiAi 127 According to one embodiment, the image decoding apparatus 100 may divide a first coding unit 1200 based on at least one of block shape information and division shape mode information. When the block shape information indicates a square shape and the division shape mode information indicates dividing the first coding unit 1200 in at least one of the horizontal and vertical directions, the image decoding apparatus 100 may determine second coding units 1210a and 1210b or 1220a and 1220b, etc., when dividing the first coding unit 1200.15 , the second non-square coding units 1210a and 1210b or 1220a and 1220b determined by dividing the first coding unit 1200 in only a horizontal or vertical direction may be divided independently based on at least one of block shape information and division shape mode information about each coding unit. For example, the image decoding apparatus 100 may determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b, which are generated by dividing the first coding unit 1200 in a vertical direction, in a horizontal direction, and may determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units. QQoann / zznz / E / YiAi 128 1220a and 1220b, which are generated by dividing the first coding unit 1200 in a horizontal direction, in a vertical direction. An operation of dividing the second coding units 1210a and 1210b or 1220a and 1220b is described above with reference to Figure 13, and therefore, detailed descriptions thereof are not provided herein. According to one embodiment, the image decoding apparatus 100 may process coding units in a predetermined order. An operation of processing coding units in a predetermined order is described above with reference to FIG. 7 , and therefore, detailed descriptions thereof are not provided herein. 15 , the image decoding apparatus 100 may determine four third square coding units 1216a, 1216b, 1216c, 1216d, and 1226a, 1226b, 1226c, and 1226d by dividing the first square coding unit 1200. According to an embodiment, the image decoding apparatus 100 may determine processing orders of the third coding units 1216a, 1216b, 1216c, 1216d, and 1226a, 1226b, 1226c, and 1226d, based on a manner of dividing by which the first coding unit 1200 is divided. According to one embodiment, the image decoding apparatus 100 may determine the third units of QQoann / zznz / E / YiAi 129 encoding 1216a, 1216b, 1216c and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in a vertical direction, in a horizontal direction and can process the third coding units 1216a, 1216b, 1216c and 1216d in a processing order 1217 to initially process the third coding units 1216a and 1216c, which are included in the second left coding unit 1210a, in a vertical direction and then process the third coding unit 1216b and 1216d, which are included in the second right coding unit 1210b, in a vertical direction. According to one embodiment, the image decoding apparatus 100 may determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in a horizontal direction, in a vertical direction, and may process the third coding units 1226a, 1226b, 1226c, and 1226d in a processing order 1227 to initially process the third coding units 1226a and 1226b, which are included in the second upper coding unit 1220a, in a horizontal direction and then process the third coding units 1226c and 1226d, which are included in the second lower coding unit 1220b, in a horizontal direction. 130 horizontal. Referring to Figure 15, the third square coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d can be determined by dividing the second coding units 1210a and 1210b and 1220a and 1220b, respectively. Although the second coding units 1210a and 1210b are determined by dividing the first coding unit 1200 in a vertical direction differently than the second coding units 1220a and 1220b which are determined by dividing the first coding unit 1200 in a horizontal direction, the third coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d divided therefrom eventually show coding units of the same manner of dividing the first coding unit 1200.Accordingly, by recursively dividing a coding unit in different ways based on at least one of block shape information and division shape mode information, the image decoding apparatus 100 can process a plurality of coding units in different orders even when it is finally determined that the coding units have the same shape. Figure 16 illustrates a process for determining the depth of a coding unit as the shape and size of the coding unit change, when the οοοαηη / ζζηζ / Ε / γίΛΐ 131 coding unit is recursively divided, such that a plurality of coding units are determined, according to a modality. According to one embodiment, the image decoding apparatus 100 may determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion may be the length of a long side of the coding unit. When the length of a long side of a coding unit before being divided is 2n times (n > 0) the length of a long side of a currently divided coding unit, the image decoding apparatus 100 may determine that the depth of the current coding unit is increased from a depth of the coding unit before being divided by n. In the following descriptions, a coding unit having an increased depth is expressed as a coding unit of a deeper depth. 16 , according to one embodiment, the image decoding apparatus 100 may determine a second coding unit 1302 and a third coding unit 1304 of deeper depths by dividing a first square coding unit 1300 based on block shape information indicating a square shape (e.g., the block shape information QQoann / zznz / E / YiAi 132 block can be expressed as 0: SQUARE). Assuming that the size of the first square coding unit 1300 is 2N x 2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by 1 / 2 may have a size of N x N. Furthermore, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 by 1 / 2 may have a size of N / 2 x N / 2. In this case, the width and height of the third coding unit 1304 are 1 / 4 times those of the first coding unit 1300.When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, the width and height of which are 1 / 2 times those of the first coding unit 1300, may be D + 1 and the depth of the third coding unit 1304, the width and height of which are 1 / 4 times those of the first coding unit 1300, may be D + 2. According to one embodiment, the image decoding apparatus 100 may determine a second coding unit 1312 or 1322 and a third coding unit 1314 or 1324 of deeper depths by dividing a first non-square coding unit 1310 or 1320 based on block shape information indicating a non-square shape (e.g., the block shape information is QQoann / zznz / E / YiAi 133 can be expressed as 1: NS_VER indicating a non-square shape, the height of which is greater than its width or as 2: NS_HOR indicating a non-square shape, the width of which is longer than the height). The image decoding apparatus 100 may determine a second coding unit 1302, 1312, or 1322 by dividing at least one of the width and height of the first coding unit 1310 having a size of N x 2N. That is, the image decoding apparatus 100 may determine the second coding unit 1302 having a size of N * N or the second coding unit 1322 having a size of N * N / 2 by dividing the first coding unit 1310 in a horizontal direction, or may determine the second coding unit 1312 having a size of N / 2 x N by dividing the first coding unit 1310 in horizontal and vertical directions. According to one embodiment, the image decoding apparatus 100 may determine the second coding unit 1302, 1312, or 1322 by dividing at least one of the width and height of the first coding unit 1320 having a size of 2N x N. That is, the image decoding apparatus 100 may determine the second coding unit 1302 having a size of N χ N or the second coding unit 1312 having a size of N / 2 χ N by dividing the first coding unit 1320 into a QQoann / zznz / E / YiAi 134 vertical direction or may determine the second coding unit 1322 having a size of N x N / 2 by dividing the first coding unit 1320 into horizontal and vertical directions. According to one embodiment, the image decoding apparatus 100 may determine a third coding unit 1304, 1314, or 1324 by dividing at least one of the width and height of the second coding unit 1302 having a size of N χ N. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2 χ N / 2, the third coding unit 1314 having a size of N / 4 χ N / 2, or the third coding unit 1324 having a size of N / 2 χ N / 4 by dividing the second coding unit 1302 in vertical and horizontal directions. According to one embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width and height of the second coding unit 1312 having a size of N / 2 χ N. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2 χ N / 2 or the third coding unit 1324 having a size of N / 2 χ N / 4 by dividing the second coding unit 1312 in a horizontal direction, or may determine the third coding unit 1304 having a size of N / 2 χ N / 4 by dividing the second coding unit 1312 in a horizontal direction. 135 coding unit 1314 having a size of N / 4 χ N / 2 by dividing the second coding unit 1312 into vertical and horizontal directions. According to one embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width and height of the second coding unit 1322 having a size of N x N / 2. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2 χ N / 2 or the third coding unit 1314 having a size of N / 4 χ N / 2 by dividing the second coding unit 1322 in a vertical direction, or may determine the third coding unit 1324 having a size of N / 2 χ N / 4 by dividing the second coding unit 1322 in vertical and horizontal directions. According to one embodiment, the image decoding apparatus 100 may divide the square coding unit 1300, 1302, or 1304 in a horizontal or vertical direction. For example, the image decoding apparatus 100 may determine the first coding unit 1310 having a size of N χ 2N by dividing the first coding unit 1300 having a size of 2N χ 2N in a vertical direction, or may determine the first coding unit 1320 having a size of 2N χ N by dividing the first coding unit 1320. 136 first coding unit 1300 in a horizontal direction. According to one embodiment, when determining the depth based on the length of the longest side of a coding unit, the depth of a coding unit is determined by dividing the first coding unit 1300 having a size of 2N χ 2N in a horizontal or vertical direction, may be the same as the depth of the first coding unit 1300. According to one embodiment, the width and height of the third coding unit 1314 or 1324 may be 1 / 4 times those of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322, the width and height of which are 1 / 2 times those of the first coding unit 1310 or 1320, may be D + 1, and the depth of the third coding unit 1314 or 1324, the width and height of which are 1 / 4 times those of the first coding unit 1310 or 1320, may be D + 2. Figure 17 illustrates depths that can be determined based on shapes and sizes of coding units and Part Indexes (PIDs) that serve to distinguish coding units, according to a modality. According to one embodiment, the decoding apparatus 137 of images 100 may determine second coding units in various ways when dividing a first square coding unit 1400. With reference to Figure 17, the image decoding apparatus 100 may determine second coding units 1402a and 1402b, 1404a and 1404b and 1406a, 1406b, 1406c and 1406d when dividing the first coding unit 1400 in at least one of the vertical and horizontal directions based on division shape mode information. That is, the image decoding apparatus 100 may determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c and 1406d, based on the splitting shape mode information of the first coding unit 1400. According to one embodiment, depths of the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d that are determined based on the division shape mode information of the first square coding unit 1400 may be determined based on the length of a long side thereof. For example, because the length of a side of the first square coding unit 1400 is equal to the length of a long side of the second non-square coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the second non-square coding units 1402a and 1402b and 1404a and 1404b may have the same depth, e.g. 138 example, D. However, when the image decoding apparatus 100 divides the first coding unit 1400 into the four second square coding units 1406a, 1406b, 1406c and 1406d based on the division shape mode information, because the length of a side of the second square coding units 1406a, 1406b, 1406c and 1406d is 1 / 2 times the length of a side of the first coding unit 1400, the depth of the second coding units 1406a, 1406b, 1406c and 1406d may be D + 1, which is deeper than the depth D of the first coding unit 1400 by 1. According to an embodiment, the image decoding apparatus 100 may determine a plurality of second coding units 1412a and 1412b and 1414a, 1414b and 1414c when dividing a first coding unit 1410, the height of which is greater than its width, in a horizontal direction based on division shape mode information. According to an embodiment, the image decoding apparatus 100 may determine a plurality of second coding units 1422a and 1422b and 1424a, 1424b and 1424c when dividing a first coding unit 1420, the width of which is greater than its height, in a vertical direction based on division shape mode information. According to one embodiment, the depth of the second coding units 1412a and 1412b and 1414a, 1414b 139 and 1414c or 1422a and 1422b and 1424a, 1424b and 1424c, which are determined based on the division shape mode information of the first non-square coding unit 1410 or 1420, may be determined based on the length of a long side thereof. For example, because the length of a side of the second square coding units 1412a and 1412b is 1 / 2 times the length of a long side of the first coding unit 1410 having a non-square shape, the height of which is greater than its width, the depth of the second square coding units 1412a and 1412b is D + 1 which is deeper than the depth D of the first non-square coding unit 1410 by 1. Furthermore, the image decoding apparatus 100 may divide the first non-square coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division shape mode information. The odd number of second coding units 1414a, 1414b, and 1414c may include the second non-square coding units 1414a and 1414c and the second square coding unit 1414b. In this case, because the length of a long side of the second non-square coding units 1414a and 1414c and the length of a side of the second square coding unit 1414b are 1 / 2 times the length of a long side of the first coding unit 1410, the depth of the second 140 coding units 1414a, 1414b and 1414c may be D + 1 which is deeper than the depth D of the first non-square coding unit 1410 by 1. The image decoding apparatus 100 may determine depths of divided coding units of the first coding unit 1420 having a non-square shape, the width of which is greater than its height, by using the aforementioned method for determining depths of divided coding units of the first coding unit 1410. According to one embodiment, the image decoding apparatus 100 may determine PID for identifying divided coding units, based on a size ratio between the coding units, when an odd number of divided coding units do not have equal sizes. With reference to Figure 17, a coding unit 1414b at a central location among an odd number of divided coding units 1414a, 1414b and 1414c may have a width equal to that of the other coding units 1414a and 1414c and a height twice as large as that of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the central location may include two of the other coding units 1414a or 1414c. Therefore, when a PID of the 1414b encoded unit at the central location is 1 based on a 141 scanning order, a PID of the coding unit 1414c located adjacent to the coding unit 1414b may be incremented by 2 and thus may be 3. That is, there may be discontinuity in PID values. According to one embodiment, the image decoding apparatus 100 may determine whether an odd number of divided coding units do not have equal sizes, based on whether there is discontinuity present in PID to identify the divided coding units. According to one embodiment, the image decoding apparatus 100 may determine whether a particular division method is used, based on PID values to identify a plurality of determined coding units when dividing a current coding unit. With reference to Figure 17, the image decoding apparatus 100 may determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b and 1414c when dividing the first coding unit 1410 having a rectangular shape, the height of which is longer than its width. The image decoding apparatus 100 may use PIDs indicating respective coding units to identify the respective coding units. According to one embodiment, the PID may be obtained from a sample at a predetermined location of each coding unit (e.g., a top sample 142 left) . According to one embodiment, the image decoding apparatus 100 may determine a coding unit at a predetermined location among the divided coding units by using the PIDs to distinguish the coding units. According to one embodiment, when the division shape mode information of the first coding unit 1410 having a rectangular shape, the height of which is greater than its width, indicates dividing a coding unit into three coding units, the image decoding apparatus 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b and 1414c. The image decoding apparatus 100 may assign a PID to each of the three coding units 1414a, 1414b and 1414c.The image decoding apparatus 100 may compare the PIDs of an odd number of divided coding units to determine a coding unit at a central location among the coding units. The image decoding apparatus 100 may determine the coding unit 1414b having a PID corresponding to a middle value among the PIDs of the coding units as the coding unit at the central location among the coding units determined by dividing the first coding unit 1410. According to one embodiment, the. 143 Image decoding apparatus 100 may determine PID for distinguishing divided coding units, based on a size ratio between the coding units when the divided coding units do not have equal sizes. With reference to Figure 17, the coding unit 1414b generated by dividing the first coding unit 1410 may have a width equal to that of the other coding units 1414a and 1414c and a height twice as large as that of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center location is 1, the PID of the coding unit 1414c located next to the coding unit 1414b may be increased by 2 and thus may be 3.When the PID is not increased uniformly as described above, the image decoding apparatus 100 may determine that a coding unit is to be divided into a plurality of coding units including a coding unit having a size different from that of the other coding units. According to one embodiment, when the splitting shape mode information indicates to divide a coding unit into an odd number of coding units, the image decoding apparatus 100 may divide a current coding unit such that a coding unit at a predetermined location among a number. 144 odd-numbered coding units (e.g., a coding unit at a central location) have a size different from that of the other coding units. In this case, the image decoding apparatus 100 may determine the coding unit at the central location having a different size by using PIDs of the coding units. However, the PIDs and size or location of the coding unit at the predetermined location are not limited to the above-mentioned examples, and multiple PIDs and multiple locations and sizes of coding units may be used. According to one embodiment, the image decoding apparatus 100 may use a predetermined data unit wherein a coding unit begins to be divided recursively. Figure 18 illustrates that a plurality of coding units are determined based on a plurality of predetermined data units included in an image, according to an embodiment. According to one embodiment, a predetermined data unit may be defined as a data unit wherein a coding unit begins to be recursively divided by using at least one of block shape information and split shape mode information. That is, the predetermined data unit may correspond to a 145 coding unit of a higher depth, which is used to determine a plurality of coding units divided from a current image. In the following descriptions, for the convenience of explanation, the predetermined data unit is referred to as the reference data unit. According to one embodiment, the reference data unit may have a predetermined size and shape. According to one embodiment, the reference data unit may include M * N samples. In this case, M and N may be equal to each other and may be integers expressed as powers of 2. That is, the reference data unit may have a square or non-square shape and may then be divided into an integer number of coding units. According to one embodiment, the image decoding apparatus 100 may divide the current image into a plurality of reference data units. According to one embodiment, the image decoding apparatus 100 may divide the plurality of reference data units, which are divided from the current image, by using the division shape mode information of each reference data unit. The reference data unit division operation may correspond to a division operation using a quad-tree structure. According to one embodiment, the οοοαηη / ζζηζ / Ε / γίΛΐ decoding apparatus 146 of images 100 may predetermine the minimum allowable size for reference data units included in the current image. Accordingly, the image decoding apparatus 100 may determine several reference data units having sizes equal to or larger than the minimum size and may determine one or more coding units by using the block shape information and the division shape mode information with reference to the determined reference data unit. With reference to Figure 18, the image decoding apparatus 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to one embodiment, the shape and size of reference coding units may be determined based on a plurality of data units that may include one or more reference coding units (e.g., sequences, images, slices, slice segments, larger coding units, or the like). According to one embodiment, the obtaining device 105 of the image decoding apparatus 100 may obtain, from a bit stream, at least one of reference coding unit shape information and reference coding unit size information with respect to each of the plurality of data units. It has been 147 An operation of dividing the square reference coding unit 1500 into one or more coding units has been described above in connection with the current coding unit dividing operation 300 of FIG. 3 and an operation of dividing the non-square reference coding unit 1502 into one or more coding units have been described above in connection with the current coding unit dividing operation 400 or 450 of FIG. 7. Therefore, detailed descriptions thereof will not be provided herein. According to one embodiment, the image decoding apparatus 100 may use a PID to identify the size and shape of reference coding units, to determine the size and shape of reference coding units according to some data units previously determined based on a predetermined condition. That is, the obtaining device 105 may obtain, from the bit stream, only the PID to identify the size and shape of the reference coding units with respect to each slice, each slice segment, or each largest coding unit that is a data unit satisfying a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the plurality of data units (e.g., sequences, images, slices, slice segments, reference coding units). QQoann / zznz / E / YiAi 148 larger coding or the like). The image decoding apparatus 100 may determine the size and shape of reference data units with respect to each data unit that satisfies the predetermined condition by using the PID. When the reference coding unit shape information and the reference coding unit size information are obtained and used from the bit stream according to each data unit having a relatively small size, the efficiency of using the bit stream may not be high, and therefore, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the reference coding unit size information.In this case, at least one of the size and shape of reference coding units corresponding to the PID may be predetermined to identify the size and shape of reference coding units. That is, the image decoding apparatus 100 may determine at least one of the size and shape of reference coding units included in a data unit serving as a unit for obtaining the PID, by selecting the predetermined at least one of the size and shape of reference coding units based on the PID. According to one embodiment, the image decoding apparatus 100 may use one or more coding units. 149 reference units included in a larger coding unit. That is, a divided larger coding unit of an image may include one or more reference coding units, and the coding units may be determined by recursively dividing each reference coding unit. According to one embodiment, at least one of the width and height of the larger coding unit may be an integer times at least one of the width and height of the reference coding units. According to one embodiment, the size of the reference coding units may be obtained by dividing the larger coding unit n times based on a four-tree structure.That is, the image decoding apparatus 100 may determine the reference coding units by dividing the largest coding unit n times based on a four-tree structure, and may divide the reference coding unit based on at least one of the block shape information and the splitting shape mode information, according to various embodiments. Figure 19 illustrates a processing block that serves as a criterion for determining an order of determining reference coding units included in an image 1600, according to one embodiment. According to one embodiment, the decoding apparatus QQoann / zznz / E / YiAi 150 of images 100 may determine one or more divided processing blocks of an image. The processing block is a data unit that includes one or more divided reference coding units of an image, and the one or more reference coding units included in the processing block may be determined according to a particular order. That is, an order of determining the one or more reference coding units determined in each of the processing blocks may correspond to one of several types of orders for determining reference coding units and may vary depending on the processing block.The order of determining reference coding units, which is determined with respect to each processing block, may be one of several orders, for example, raster scan order, Z-scan, N-scan, diagonal up scan, horizontal and vertical scan, scan, but is not limited to the aforementioned scanning orders. According to one embodiment, the image decoding apparatus 100 may obtain processing block size information and may determine the size of one or more processing blocks included in the image. The image decoding apparatus 100 may obtain the processing block size information of a bit stream and may determine the size of one or more processing blocks. QQoann / zznz / E / YiAi 151 included in the image. The processing block size can be a predetermined data unit size, indicated by the processing block size information. According to one embodiment, the obtaining device 105 of the image decoding apparatus 100 may obtain the processing block size information of the bit stream according to each particular data unit. For example, the processing block size information may be obtained from the bit stream in a data unit such as an image, sequence, picture, slice, slice segment, or the like. That is, the obtaining device 105 may obtain the processing block size information of the bit stream according to each of the plurality of data units, and the image decoding apparatus 100 may determine the size of one or more processing blocks, which are divided from the image, by using the obtained processing block size information. The size of the processing blocks may be an integer multiplied by that of the reference coding units. According to one embodiment, the image decoding apparatus 100 may determine the size of processing blocks 1602 and 1612 included in the image 1600. For example, the image decoding apparatus 100 may 152 determining the size of processing blocks based on processing block size information obtained from the bit stream. With reference to Figure 19, according to an embodiment, the image decoding apparatus 100 may determine that the width of the processing blocks 1602 and 1612 is four times the width of the reference coding units and may determine that the height of the processing blocks 1602 and 1612 is four times the height of the reference coding units. The image decoding apparatus 100 may determine an order of determining one or more reference coding units in the one or more processing blocks. According to one embodiment, the image decoding apparatus 100 may determine processing blocks 1602 and 1612, which are included in the image 1600, based on the size of the processing blocks and may determine an order of determining one or more reference coding units in the processing blocks 1602 and 1612. According to one embodiment, determining reference coding units may include determining the size of the reference coding units. According to one embodiment, the image decoding apparatus 100 may obtain, from the bit stream, determination order information of one or more reference coding units included in one or more processing blocks. 153 and can determine a determination order with respect to one or more reference coding units based on the obtained determination order information. The determination order information can be defined as an order or direction for determining the reference coding units in the processing block. That is, the determination order of reference coding units can be determined independently with respect to each processing block. According to one embodiment, the image decoding apparatus 100 may obtain, from the bit stream, reference coding unit determination order information according to each particular data unit. For example, the obtaining device 105 may obtain the reference coding unit determination order information from the bit stream according to each data unit, such as a picture, sequence, image, slice, slice segment, or processing block. Because the reference coding unit determination order information indicates an order for determining reference coding units in a processing block, the determination order information may be obtained with respect to each particular data unit including an integer number of processing blocks. According to one embodiment, the decoding apparatus QQoann / zznz / E / YiAi 154 of images 100 may determine one or more reference coding units based on the determined determination order. According to one embodiment, the obtaining device 105 may obtain the determination order information of reference coding units of the bit stream as information related to the processing blocks 1602 and 1612, and the image decoding apparatus 100 may determine a determination order of one or more reference coding units included in the processing blocks 1602 and 1612, and may determine one or more reference coding units, which are included in the image 1600, based on the determination order. With reference to Figure 19, the image decoding apparatus 100 may determine determination orders 1604 and 1614 of one or more reference coding units in the processing blocks 1602 and 1612, respectively.For example, when obtaining the reference coding unit determination order information with respect to each processing block, different types of reference coding unit determination order information may be obtained for the processing blocks 1602 and 1612. When the reference coding unit determination order 1604 in the processing block 1602 is a frame scanning order, the reference coding units. 155 reference coding units included in the processing block 1602 may be determined according to a frame scanning order. On the contrary, when the determination order 1614 of reference coding units in the other processing block 1612 is a backward frame scanning order, the reference coding units included in the processing block 1612 may be determined according to the backward frame scanning order. According to one embodiment, the image decoding apparatus 100 may decode the one or more determined reference coding units. The image decoding apparatus 100 may decode an image based on the reference coding units determined as described above. A method of decoding the reference coding units may include a plurality of image decoding methods. According to one embodiment, the image decoding apparatus 100 may obtain, from the bit stream, block shape information indicating a shape of a current coding unit or split shape mode information indicating a splitting method of the current coding unit and may use the obtained information. The block shape information or the split shape mode information may be included in the bit stream related to various οοοαηη / ζζηζ / Ε / γίΛA. 156 data units. For example, the image decoding apparatus 100 may use the block shape information or the slice shape mode information included in a sequence parameter set, an image parameter set, a video parameter set, a slice header, or a slice segment header. In addition, the image decoding apparatus 100 may obtain, from the bit stream, a syntax element corresponding to the block shape information or the slice shape mode information according to each larger coding unit, each reference coding unit, or each processing block, and may use the obtained syntax element. The invention has been shown and described particularly with reference to embodiments thereof. In this regard, one of ordinary skill in the art will understand that various changes in form and details can be made without departing from the scope of the description. Therefore, the embodiments should be considered only in a descriptive sense and not for purposes of limitation. The scope of the description is not defined by the detailed descriptions of the invention, but by the following claims, and all differences within the scope shall be construed as included in the description. Meanwhile, the embodiments of the invention described above can be written as an executable program. 157 on a computer and can be implemented on general-purpose digital computers that execute the program using a computer-readable recording medium. Examples of computer-readable recording media include magnetic storage media (e.g., ROM, floppy disks, hard disks, etc.), optical recording media (e.g., CD-ROM or DVD), or the like. It is noted that in relation to this date, the best method known to the applicant to put the aforementioned invention into practice is the one that is clear from the present description of the invention.
Claims
CLAIMS Having been described above, the property claimed is that contained in the following claims:
1. An image decoding method, characterized in that it comprises: obtaining a plurality of larger coding units by dividing a current image based on size information of a larger coding unit; obtaining one or more coding units comprising a current coding unit, by hierarchically dividing at least one larger coding unit among the plurality of larger coding units, based on a division shape mode; based on a prediction mode of the current coding unit which is an Inter mode, obtaining, from a bit stream, a first coded block flag indicating whether the current coding unit comprises one or more non-zero significant transform coefficients;based on the first coded block flag indicating that the current coding unit comprises one or more non-zero significant transform coefficients QQoann / zznz / E / YiAi 159 that identify whether at least one of a height and a width of the current coding unit is greater than a predetermined size; based on whether the at least one of the height and the width of the current coding unit is greater than the predetermined size, obtaining at least one transform unit included in the current coding unit; obtaining a second coded block flag about at least one of the chrominance components of the bit stream, the second coded block flag indicating whether at least one transform block of the at least one of the chrominance components in the at least one transform unit comprises the at least one transform coefficient in the bit stream;based on at least one of a height and a width of the current coding unit being greater than the predetermined size, obtaining a third coded block flag from the bitstream, the third coded block flag indicating whether a block of a luminance component included in the at least one transformation unit comprises one or more non-zero significant transformation coefficients; based on the height and width of the current coding unit being less than or equal to the predetermined size, identifying that the third coded block flag indicates that the block of the luminance component included in the at least one transformation unit comprises one or more non-zero significant transformation coefficients; obtaining a residual signal of the block of the luminance component included in the at least one transformation unit, based on the third coded block flag;reconstructing the current coding unit based on the residual signal; and reconstructing the current image comprising the current coding unit, based on the reconstructed current coding unit, wherein the split shape mode indicates at least one of whether splitting is performed, a splitting direction, or a splitting type, and wherein the splitting type corresponds to one of binary splitting, triple splitting, and quadruple splitting, wherein the current coding unit has a square shape or a rectangular shape; 2. A machine-readable recording medium for decoding images comprising the method according to claim 1.