Image decoding method and apparatus, and image encoding method and apparatus

By obtaining the division rules and shape patterns of encoding units from the bitstream, the division of encoding units is optimized, and the problem of high encoding complexity in flexible tree division is solved, and a more efficient encoding process is achieved.

CN116074511BActive Publication Date: 2025-07-08SAMSUNG ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310086166.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-07-06
Filing Date
2018-03-30
Publication Date
2025-07-08
Estimated Expiration
2038-03-30

AI Technical Summary

Technical Problem

When using flexible tree division in the prior art, the encoding complexity is high, making it difficult to effectively improve encoding efficiency and reduce complexity.

Method used

By obtaining the binary bit string corresponding to the partition shape mode of the encoding unit from the bit stream, the division rules of the encoding unit are determined, and the encoding unit is divided into multiple encoding units based on the rules, and the dimension range is determined using the aspect ratio and partition shape mode of the encoding unit to achieve optimization of flexible tree division.

Benefits of technology

It reduces the encoding complexity, improves the encoding efficiency, and adapts to the encoding requirements of different image complexity levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074511B_ABST
    Figure CN116074511B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image decoding method and apparatus, and an image encoding method and apparatus. The image decoding method includes the following steps: obtaining a binary bit string corresponding to a partitioning shape mode of a coding unit from a bitstream; determining a partitioning rule of the coding unit; and partitioning the coding unit into a plurality of coding units based on at least one of the partitioning rule and the binary bit string corresponding to the partitioning shape mode, wherein the step of determining the partitioning rule includes the following steps: determining a first allowable range of the size of the coding unit based on the aspect ratio of the coding unit; and determining a second allowable range of the size of the coding unit according to the partitioning shape mode of the coding unit.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the application titled "Video Encoding Method and Apparatus, Video Decoding Method and Apparatus" with an application date of March 30, 2018, and an application number of 201880044825.X, which was filed with the State Intellectual Property Office. Technical Field

[0002] The method and apparatus according to an embodiment can encode or decode an image by using coding units of various shapes included in the image. Background Art

[0003] With the development and supply of hardware capable of reproducing and storing high-resolution or high-quality image content, the demand for codecs capable of effectively encoding or decoding such high-resolution or high-quality image content has increased. Encoded image content can be reproduced by being decoded. Recently, methods for effectively compressing such high-resolution or high-quality image content have been implemented. For example, an effective image compression method is achieved by arbitrarily processing the process of an encoded image.

[0004] To compress an image, various data units can be used, and there can be an inclusion relationship between these data units. The data units can be divided according to various methods to determine the size of the data units for image compression, and the image can be encoded or decoded by determining optimized data units according to the characteristics of the image.

[0005] The data units can be determined by recursively performing flexible tree partitioning. Flexible tree partitioning can include binary partitioning, ternary partitioning, or quaternary partitioning. In addition, by allowing square data units and non-square data units, optimized data units for encoding can be determined according to the characteristics of the image. However, since various-shaped data units and various partitioning shapes are used, the encoding complexity may increase. Therefore, there is a need for image decoding / encoding methods and apparatuses for improving encoding efficiency and reducing complexity when using flexible tree partitioning. Summary of the Invention

[0006] According to an embodiment of the present disclosure, an image decoding method includes: obtaining a binary bit string corresponding to a partitioning shape pattern of a coding unit from a bitstream; determining a partitioning rule of the coding unit; and partitioning the coding unit into a plurality of coding units based on at least one of the partitioning rule and the binary bit string corresponding to the partitioning shape pattern. The step of determining the partitioning rule includes: determining a first allowable range of the size of the coding unit according to an aspect ratio of the coding unit; and determining a second allowable range of the size of the coding unit according to the partitioning shape pattern of the coding unit.

[0007] According to an embodiment of the present disclosure, the partitioning rule may be determined based on information obtained from a bitstream.

[0008] According to an embodiment of the present disclosure, the partitioning shape pattern may include at least one of a binary partition, a ternary partition, or a quaternary partition.

[0009] According to an embodiment of the present disclosure, the step of partitioning the coding unit into a plurality of coding units may include: when a binary bitstring corresponding to the partitioning shape pattern is not required, partitioning the largest coding unit into coding units of a first size; and partitioning the coding units of the first size into a plurality of coding units based on the partitioning rule and the binary bitstring corresponding to the partitioning shape pattern.

[0010] According to an embodiment of the present disclosure, the partitioning rule may be determined for each complexity level of an image.

[0011] According to an embodiment of the present disclosure, the step of partitioning the coding unit into a plurality of coding units may further include: obtaining a candidate partitioning shape pattern applicable to the current coding unit based on the partitioning rule; determining information about the partitioning shape pattern of the current coding unit based on at least one of the candidate partitioning shape pattern, the binary bitstring corresponding to the partitioning shape pattern, and block shape information of the current coding unit; and partitioning the current coding unit based on the information about the partitioning shape pattern.

[0012] According to an embodiment of the present disclosure, an image decoding device includes at least one processor, wherein the at least one processor is configured to perform the following steps: obtaining a binary bitstring corresponding to a partitioning shape pattern of a coding unit from a bitstream; determining a partitioning rule of the coding unit; and partitioning the coding unit into a plurality of coding units based on at least one of the partitioning rule and the binary bitstring corresponding to the partitioning shape pattern. The step of determining the partitioning rule includes: determining a first allowable range of the size of the coding unit according to the aspect ratio of the coding unit; and determining a second allowable range of the size of the coding unit according to the partitioning shape pattern of the coding unit.

[0013] According to an embodiment of the present disclosure, an image coding method includes: determining a partitioning rule for a coding unit; obtaining a binary bit string corresponding to a partitioning shape mode for partitioning the coding unit into a plurality of coding units based on at least one of the partitioning rule of the coding unit and information about the partitioning shape mode; and generating a bitstream by performing entropy coding on the binary bit string corresponding to the partitioning shape mode, wherein the step of determining the partitioning rule includes: determining a first allowable range of the size of the coding unit according to the aspect ratio of the coding unit; and determining a second allowable range of the size of the coding unit according to the partitioning shape mode of the coding unit.

[0014] According to an embodiment of the present disclosure, the image coding method may further include: generating a bitstream based on the partitioning rule.

[0015] According to an embodiment of the present disclosure, the partitioning shape mode may include at least one of bipartition, tripartition, or quadripartition.

[0016] According to an embodiment of the present disclosure, the image coding method may further include: quadripartitioning a maximum coding unit into coding units of a first size; and generating information about the partitioning shape mode for partitioning the coding units of the first size into a plurality of coding units based on the partitioning rule.

[0017] According to an embodiment of the present disclosure, the partitioning rule may be determined for each complexity level of the image.

[0018] According to an embodiment of the present disclosure, the step of obtaining the binary bit string corresponding to the partitioning shape mode may further include: obtaining a candidate partitioning shape mode applicable to the current coding unit based on the partitioning rule; obtaining information about the partitioning shape mode of the current coding unit; and obtaining the binary bit string corresponding to the partitioning shape mode based on at least one of the block shape information of the current coding unit, the candidate partitioning shape mode, and the information about the partitioning shape mode.

[0019] According to an embodiment of the present disclosure, an image coding device includes at least one processor, wherein the at least one processor is configured to perform the following steps: determining a partitioning rule for a coding unit; obtaining a binary bit string corresponding to a partitioning shape mode for partitioning the current coding unit into a plurality of coding units based on at least one of the partitioning rule of the coding unit and information about the partitioning shape mode; and generating a bitstream based on the binary bit string corresponding to the partitioning shape mode, wherein the step of determining the partitioning rule includes: determining a first allowable range of the size of the coding unit according to the aspect ratio of the coding unit; and determining a second allowable range of the size of the coding unit according to the partitioning shape mode of the coding unit.

[0020] According to an embodiment of the present disclosure, a computer-readable recording medium may have a computer program for performing an image decoding method recorded thereon. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a schematic block diagram of an image decoding device 100 according to an embodiment.

[0022] Figure 2 is a flowchart of an image decoding method according to an embodiment.

[0023] Figure 3 illustrates a process of determining at least one coding unit by dividing a current coding unit performed by an image decoding device according to an embodiment.

[0024] Figure 4 illustrates a process of determining at least one coding unit by dividing a non-square coding unit performed by an image decoding device according to an embodiment.

[0025] Figure 5 illustrates a process of dividing a coding unit based on at least one of block shape information and partitioning shape information performed by an image decoding device according to an embodiment.

[0026] Figure 6 illustrates a method of determining a predetermined coding unit from an odd number of coding units performed by an image decoding device according to an embodiment.

[0027] Figure 7 illustrates an order of processing a plurality of coding units when an image decoding device determines the plurality of coding units by dividing a current coding unit according to an embodiment.

[0028] Figure 8 illustrates a process of determining that a current coding unit is to be divided into an odd number of coding units when a coding unit is not processable in a predetermined order by an image decoding device according to an embodiment.

[0029] Figure 9 illustrates a process of determining at least one coding unit by dividing a first coding unit performed by an image decoding device according to an embodiment.

[0030] Figure 10 illustrates that when a second coding unit having a non-square shape determined when dividing a first coding unit by an image decoding device satisfies a predetermined condition, the shape into which the second coding unit can be divided is restricted.

[0031] Figure 11Shows a process of dividing a square coding unit when information on a partitioning shape pattern cannot indicate dividing the square coding unit into four square coding units, which is performed by an image decoding device according to an embodiment.

[0032] Figure 12 Shows that according to an embodiment, the processing order between multiple coding units can be changed based on the process of dividing coding units.

[0033] Figure 13 Shows a process of determining the depth of a coding unit as the shape and size of the coding unit change when recursively dividing the coding unit such that multiple coding units are determined, according to an embodiment.

[0034] Figure 14 Shows the depth that can be determined based on the shape and size of a coding unit and a partial index (PID) for distinguishing the coding unit, according to an embodiment.

[0035] Figure 15 Shows determining multiple coding units based on multiple predetermined data units included in a picture, according to an embodiment.

[0036] Figure 16 Shows a processing block that serves as a criterion for determining the determination order of a reference coding unit included in a picture, according to an embodiment.

[0037] Figure 17 Is a diagram for describing block shape information according to an embodiment.

[0038] Figure 18 Is a diagram for describing block shape information according to an embodiment.

[0039] Figure 19 Is a diagram for describing the process of determining a context model according to block shape information according to an embodiment.

[0040] Figure 20 Is a diagram for describing a method of determining a context model according to an embodiment.

[0041] Figure 21 Is a diagram for describing a method of determining a context model according to an embodiment.

[0042] Figure 22 Is a schematic block diagram of an image coding device according to an embodiment.

[0043] Figure 23 Is a flowchart of an image coding method according to an embodiment.

[0044] Figure 24 Is a diagram for describing a method of dividing a current coding unit according to an embodiment. Detailed Implementation Modes

[0045] By referring to the embodiments and the accompanying drawings, the advantages and features of one or more embodiments and the methods for implementing them can be more easily understood. In this regard, the embodiments of the present disclosure may have different forms and should not be construed as limited to the descriptions set forth herein. Instead, these embodiments are provided so that the present disclosure will be thorough and complete, and will fully convey the concept of the embodiments provided by the present disclosure to those of ordinary skill in the art.

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

[0047] All terms, including descriptive or technical terms, used herein should be construed as having meanings that are obvious to those of ordinary skill in the art. However, depending on the intention of those of ordinary skill in the art, precedent, or the emergence of new technologies, these terms may have different meanings. In addition, some terms may be arbitrarily selected by the applicant, and in such cases, the meanings of the selected terms will be described in detail in the detailed description of the present disclosure. Therefore, the terms used herein must be defined based on the meanings of the terms and the descriptions throughout the specification.

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

[0049] When a component "includes" or "contains" an element, unless there is a specific description to the contrary, the component may also include other elements without excluding other elements.

[0050] In the following description, terms such as "unit" refer to software or hardware components, and the "unit" performs a specific function. However, the "unit" is not limited to software or hardware. The "unit" may be formed in an addressable storage medium or may be formed to operate one or more processors. Therefore, 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, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, or variables. The functions provided by components and "units" may be associated with a smaller number of components and "units" or may be divided into additional components and "units".

[0051] According to an embodiment of the present disclosure, a "unit" may include a processor and a 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, etc. In some cases, the "processor" may refer to an application-specific semiconductor integrated circuit (ASIC), a programmable logic device (PLD), a field-programmable gate array (FPGA), etc. 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 multiple microprocessors, a combination of one or more microprocessors and a DSP core, or any other such configuration combination.

[0052] The term "memory" should be broadly interpreted to include any electronic component capable of storing electronic information. The term "memory" may 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, magnetic or optical data storage devices, registers, etc. When the processor can read information from the memory and / or write information to the memory, the memory may be said to be in electronic communication with the processor. The memory integrated in the processor is in electronic communication with the processor.

[0053] Hereinafter, an "image" may be a still image such as a static image of a video, or may be a moving image such as a video itself (i.e., the video itself).

[0054] Hereinafter, a "sample point" represents data assigned to a sampling position of an image, that is, data to be processed. For example, a pixel value of an image in the spatial domain and a transform coefficient in the transform domain may be sample points. A unit including at least one such sample point may be defined as a block.

[0055] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings so that those of ordinary skill in the art can easily implement the embodiments. In the drawings, parts irrelevant to the description are omitted to clearly describe the present disclosure.

[0056] Hereinafter, reference will be made to Figures 1 to 24 Describe an image encoding device and an image decoding device, as well as an image encoding method and an image decoding method according to an embodiment. Reference will be made to Figures 3 to 16 Describe a method for determining a data unit of an image according to an embodiment. Reference will be made to Figure 1 、 Figure 2 And Figures 17 to 24 Describe an encoding method and device or a decoding method and device for adaptively selecting a context model based on various-shaped coding units according to an embodiment.

[0057] In the following, reference will be made to Figure 1 and Figure 2 describe a method and apparatus for adaptively selecting a context model based on coding units of various shapes according to embodiments of the present disclosure.

[0058] Figure 1 is a schematic block diagram of an image decoding device 100 according to an embodiment.

[0059] The image decoding device 100 may include a receiver 110 and a decoder 120. The receiver 110 and the decoder 120 may include at least one processor. In addition, the receiver 110 and the decoder 120 may include a memory storing instructions to be executed by the at least one processor.

[0060] The receiver 110 may receive a bitstream. The bitstream includes information on an image encoded by an image encoding device 2200 described later. In addition, the bitstream may be sent from the image encoding device 2200. The image encoding device 2200 and the image decoding device 100 may be connected via a wired or wireless manner, and the receiver 110 may receive the bitstream via a wired or wireless manner. The receiver 110 may receive the bitstream from a storage medium such as an optical medium or a hard disk. The decoder 120 may reconstruct an image based on the information obtained from the received bitstream. The decoder 120 may obtain syntax elements for reconstructing the image from the bitstream. The decoder 120 may reconstruct the image based on the syntax elements.

[0061] Reference will be made to Figure 2 describe the operation of the image decoding device 100 in detail.

[0062] Figure 2 is a flowchart of an image decoding method according to an embodiment.

[0063] According to an embodiment of the present disclosure, the receiver 110 receives a bitstream.

[0064] The image decoding device 100 obtains a binary bit string corresponding to a partitioning shape mode of a coding unit from the bitstream (operation 210). The image decoding device 100 determines a partitioning rule of the coding unit (operation 220). In addition, the image decoding device 100 divides the coding unit into a plurality of coding units based on at least one of the partitioning rule and the binary bit string corresponding to the partitioning shape mode. The image decoding device 100 may determine a first allowable range of the size of the coding unit according to the aspect ratio of the coding unit in order to determine the partitioning rule. The image decoding device 100 may determine a second allowable range of the size of the coding unit according to the partitioning shape mode of the coding unit in order to determine the partitioning rule.

[0065] In the following, the partitioning of the coding unit will be described in detail according to embodiments of the present disclosure.

[0066] An image can be divided into maximum coding units. The size of the maximum coding unit can be determined based on information obtained from a bitstream. The shape of the maximum coding unit can be a square of the same size. However, embodiments are not limited thereto. In addition, the maximum coding unit can be hierarchically divided into coding units based on information about a partitioning shape pattern obtained from the bitstream. The information about the partitioning shape pattern can include at least one of information indicating whether partitioning is performed, partitioning direction information, and partitioning type information. The information indicating whether partitioning is performed indicates whether to partition a coding unit. The partitioning direction information indicates partitioning along one of a horizontal direction or a vertical direction. The partitioning type information indicates partitioning a coding unit via one of binary partitioning, ternary partitioning, or quaternary partitioning.

[0067] For example, the information (split_mode) about the partitioning shape pattern can indicate that the current coding unit is not partitioned (NO_SPLIT). In addition, the information about the partitioning shape pattern can include quaternary partitioning (QUAD_SPLIT). In addition, the information about the partitioning shape pattern can indicate binary vertical partitioning (BI_VER_SPLIT). In addition, the information about the partitioning shape pattern can indicate binary horizontal partitioning (BI_HOR_SPLIT). In addition, the information about the partitioning shape pattern can indicate ternary vertical partitioning (TRI_VER_SPLIT). In addition, the information about the partitioning shape pattern can indicate ternary horizontal partitioning (TRI_HOR_SPLIT).

[0068] The image decoding device 100 can obtain information about a partitioning shape pattern as a single binary bitstream from a bitstream. The form of the bitstream received by the image decoding device 100 can include a fixed-length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The binary bitstream is information in the form of binary numbers. The binary bitstream can include at least one bit. The image decoding device 100 can obtain information about the partitioning shape pattern corresponding to the binary bitstream based on a partitioning rule. The image decoding device 100 can determine whether to partition a coding unit, the partitioning direction, and the partitioning type based on a single binary bitstream.

[0069] A coding unit can be smaller than or the same as the maximum coding unit. For example, when the information about the partitioning shape pattern indicates that partitioning is not performed, the coding unit has the same size as the maximum coding unit. When the information about the partitioning shape pattern indicates that partitioning is performed, the maximum coding unit can be divided into coding units. In addition, when the information about the partitioning shape pattern of a coding unit indicates that partitioning is performed, the coding unit can be divided into smaller coding units. However, the partitioning of an image is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished. The partitioning of the coding unit will be described in detail with reference to Figures 3 to 16 Describe the partitioning of the coding unit in detail.

[0070] A coding unit may be divided into prediction units for predicting an image. A prediction unit may be the same as or smaller than the coding unit. In addition, a coding unit may be divided into transform units for transforming an image. A transform unit may be the same as or smaller than the coding unit. The shapes and sizes of the transform unit and the prediction unit may be independent of each other. The coding unit may be distinguished from the prediction unit and the transform unit, but the coding unit, the prediction unit, and the transform unit may be the same. The division of the prediction unit and the transform unit may be performed 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 3 to 16 The current block and the surrounding blocks of the present disclosure may indicate one of the largest coding unit, coding unit, prediction unit, and transform unit. In addition, the current block of the current coding unit is the block that is currently being decoded or encoded or the block that is currently being divided. The surrounding block may be a block that has been reconstructed before the current block. The surrounding block may be adjacent to the current block spatially or temporally. The surrounding block may be located at one of the lower left, left, upper left, upper, upper right, right, and lower right of the current block.

[0071] Figure 3 FIG. shows a process of determining at least one coding unit by dividing a current coding unit performed by an image decoding apparatus 100 according to an embodiment.

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

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

[0074] When the length of the width and the height of the coding unit are different (i.e., when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, or N×4N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a non-square. When the shape of the coding unit is a non-square, the image decoding apparatus 100 may determine the aspect ratio in the block shape information of the coding unit as at least one of 1:2, 2:1, 1:4, 4:1, 1:8, or 8:1. In addition, the image decoding apparatus 100 may determine whether the coding unit is in the horizontal direction or the vertical direction based on the length of the width and 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.

[0075] According to an embodiment, the image decoding device 100 may determine the shape of a coding unit by using block shape information, and may determine a method of dividing the coding unit by using information on a division shape pattern. That is, the method of dividing the coding unit indicated by the information indicating the division shape pattern may be determined based on the block shape indicated by the block shape information used by the image decoding device 100.

[0076] The image decoding device 100 may obtain information on a division shape pattern from a bitstream. However, the embodiment is not limited thereto, and the image decoding device 100 and the image encoding device 2200 may determine information on a pre-agreed division shape pattern based on block shape information. The image decoding device 100 may determine information on a pre-agreed division shape pattern for a largest coding unit or a smallest coding unit. For example, the image decoding device 100 may determine the information on the division shape pattern for the largest coding unit as a four-division. In addition, the image decoding device 100 may determine the information on the division shape pattern for the smallest coding unit as "no division is performed". Specifically, the image decoding device 100 may determine the size of the largest coding unit as 256×256. The image decoding device 100 may determine the information on the pre-agreed division shape pattern as a four-division. A four-division is a division shape pattern in which both the width and height of a coding unit are bisected. The image decoding device 100 may obtain a coding unit having a size of 128×128 from the largest coding unit having a size of 256×256 based on the information on the division shape pattern. In addition, the image decoding device 100 may determine the size of the smallest coding unit as 4×4. The image decoding device 100 may obtain information on the division shape pattern indicating "no division is performed" for the smallest coding unit.

[0077] According to an embodiment, the image decoding device 100 may use block shape information indicating that a current coding unit has a square shape. For example, the image decoding device 100 may determine whether to divide a square coding unit, whether to vertically divide a square coding unit, whether to horizontally divide a square coding unit, or whether to divide a square coding unit into four coding units based on the information on the division shape pattern. Refer to Figure 3 , when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may determine that a coding unit 310a having the same size as the current coding unit 300 is not divided based on the information on the division shape pattern indicating no division is performed, or may determine coding units 310b, 310c, or 310d divided based on the information on the division shape pattern indicating a predetermined division method.

[0078] Refer to Figure 3, according to an embodiment, the image decoding device 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on information about a division shape pattern indicating division in the vertical direction. The image decoding device 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on information about a division shape pattern indicating division in the horizontal direction. The image decoding device 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on information about a division shape pattern indicating division in the vertical and horizontal directions. However, the method for dividing a square coding unit is not limited to the above method, and the information about the division shape pattern may indicate various methods. A predetermined division method for dividing a square coding unit will be described in detail with respect to various embodiments below.

[0079] Figure 4 FIG. shows a process of determining at least one coding unit by dividing a non-square coding unit performed by the image decoding device 100 according to an embodiment.

[0080] , according to an embodiment, the image decoding device 100 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding device 100 may determine whether not to divide the non-square current coding unit or whether to divide the non-square current coding unit by using a predetermined division method based on information about a division shape pattern. Refer to Figure 4 , when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding device 100 may determine that the coding units 410 or 460 having the same size as the current coding unit 400 or 450 are not divided based on information about a division shape pattern indicating no division, or may determine the coding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c divided based on information about a division shape pattern indicating a predetermined division method. A predetermined division method for dividing a non-square coding unit will be described in detail in association with various embodiments below.

[0081] , according to an embodiment, the image decoding device 100 may determine a division method of a coding unit by using information about a division shape pattern, and in this case, the information about the division shape pattern may indicate the number of one or more coding units generated by dividing the coding unit. Refer to Figure 4When the information on the partitioning shape mode indicates that the current coding unit 400 or 450 is partitioned into two coding units, the image decoding device 100 may determine two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by partitioning the current coding unit 400 or 450 based on the information on the partitioning shape mode.

[0082] According to an embodiment, when the image decoding device 100 partitions a non-square current coding unit 400 or 450 based on the information on the partitioning shape mode, the image decoding device 100 may consider the position of the long side of the non-square current coding unit 400 or 450 to partition the current coding unit. For example, the image decoding device 100 may determine a plurality of coding units by partitioning the long side of the current coding unit 400 or 450 in consideration of the shape of the current coding unit 400 or 450.

[0083] According to an embodiment, when the information on the partitioning shape mode indicates that the coding unit is partitioned into an odd number of blocks (triple partitioning), the image decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450. For example, when the information on the partitioning shape mode indicates that the current coding unit 400 or 450 is partitioned into three coding units, the image decoding device 100 may partition the current coding unit 400 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480c.

[0084] According to an embodiment, the aspect ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the aspect ratio is 4:1, since the length of the width is longer than the length of the height, the block shape information may be in the horizontal direction. When the aspect ratio is 1:4, since the length of the width is shorter than the length of the height, the block shape information may be in the vertical direction. The image decoding device 100 may determine to partition the current coding unit into an odd number of blocks based on the information on the partitioning shape mode. In addition, the image decoding device 100 may determine the partitioning 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 device 100 may determine the coding units 430a to 430c by partitioning 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 device 100 may determine the coding units 480a to 480c by partitioning the current coding unit 450 in the vertical direction.

[0085] According to an embodiment, the image decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and not all of the determined coding units may have the same size. For example, a 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 that 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, all of the odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.

[0086] According to an embodiment, when the information about the partitioning shape mode indicates that the coding unit is partitioned into an odd number of blocks, the image decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and in addition, a predetermined restriction may be imposed on at least one of the odd number of coding units generated by partitioning the current coding unit 400 or 450. Referring to Figure 4 , the image decoding device 100 may set the decoding process related to the central coding unit 430b or 480b among the three coding units 430a, 430b, and 430c or 480a, 480b, and 480c generated when the current coding unit 400 or 450 is partitioned to be different from the decoding processes of the other coding units 430a and 430c or 480a and 480c. For example, different from the other coding units 430a and 430c or 480a and 480c, the image decoding device 100 may restrict the coding unit 430b or 480b at the central position from being further partitioned or only being partitioned a predetermined number of times.

[0087] Figure 5 Illustrates a process of partitioning a coding unit by the image decoding device 100 based on at least one of block shape information and information about a partitioning shape mode according to an embodiment.

[0088] According to an embodiment, the image decoding device 100 may determine whether to divide the square first coding unit 500 into coding units or not based on at least one of the block shape information and the information on the division shape pattern. According to an embodiment, when the information on the division shape pattern indicates dividing the first coding unit 500 in the horizontal direction, the image decoding device 100 may determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The first coding unit, the second coding unit, and the third coding unit used according to the embodiment are terms for understanding the relationship before and after dividing the coding unit. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the structures of the first coding unit, the second coding unit, and the third coding unit follow the above description.

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

[0090] Referring to Figure 5, a predetermined coding unit (e.g., a coding unit at the center position or a square coding unit) among an odd number of third coding units 520b, 520c, and 520d determined by recursively dividing a non-square second coding unit 510 can be divided. According to an embodiment, a square third coding unit 520b among the odd number of third coding units 520b, 520c, and 520d can be divided into a plurality of fourth coding units along the horizontal direction. A non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d can be divided into a plurality of coding units again. For example, a non-square fourth coding unit 530b or 530d can be divided into an odd number of coding units again. Methods for recursively dividing coding units will be described below with respect to various embodiments.

[0091] According to an embodiment, the image decoding device 100 can divide the third coding units 520a, 520b, 520c, or 520d into coding units based on the block shape information and the information about the division shape pattern. In addition, the image decoding device 100 can determine not to divide the second coding unit 510 based on at least one of the block shape information and the information about the division shape pattern. According to an embodiment, the image decoding device 100 can divide a non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 can impose a predetermined restriction on a predetermined third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 can limit the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d from being divided any further or being divided a settable number of times.

[0092] Referring to Figure 5 , the image decoding device 100 can limit the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 from being divided any further, being divided by using a predetermined division method (e.g., only divided into four coding units or divided by using the division method of the second coding unit 510), or only being divided a predetermined number of times (e.g., only divided n times (where n > 0)). However, the restriction on the third coding unit 520c at the center position is not limited to the above examples and can include various restrictions for decoding the third coding unit 520c at the center position differently from the other third coding units 520b and 520d.

[0093] According to an embodiment, the image decoding device 100 can obtain at least one of the block shape information and the information about the division shape pattern for dividing the current coding unit from a predetermined position in the current coding unit.

[0094] Figure 6 Disclosed is a method for determining a predetermined coding unit from an odd number of coding units, which is performed by an image decoding device 100 according to an embodiment.

[0095] Referring to Figure 6 , at least one of the block shape information and the information on the partitioning shape mode of the current coding unit 600 or 650 can be obtained from a sample point at a predetermined position among a plurality of sample points included in the current coding unit 600 or 650 (e.g., the sample point 640 or 690 at the center position). However, the predetermined position in the current coding unit 600 from which at least one of the block shape information and the information on the partitioning shape mode can be obtained is not limited to Figure 6 the center position in, and can include various positions included in the current coding unit 600 (e.g., upper, lower, left, right, upper left, lower left, upper right, and lower right positions). The image decoding device 100 can obtain at least one of the block shape information and the information on the partitioning shape mode from the predetermined position, and determine whether to divide the current coding unit into coding units of various shapes and various sizes.

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

[0097] According to an embodiment, the image decoding device 100 can divide the current coding unit into a plurality of coding units, and can determine the coding unit at the predetermined position.

[0098] According to an embodiment, the image decoding device 100 can use the information indicating the positions of an odd number of coding units to determine the coding unit at the center position from the odd number of coding units. Referring to Figure 6, the image decoding device 100 may determine an odd number of coding units 620a, 620b, and 620c or an odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The decoding device 100 may determine the middle coding unit 620b or the middle coding unit 660b by using the information about the positions of the odd number of coding units 620a, 620b, and 620c or the positions of the odd number of coding units 660a, 660b, and 660c. For example, the image decoding device 100 may determine the coding unit 620b at the central position by determining the positions of the coding units 620a, 620b, and 620c based on the information indicating the positions of predetermined samples included in the coding units 620a, 620b, and 620b. Specifically, the image decoding device 100 may determine the coding unit 620b at the central position by determining the positions of the coding units 620a, 620b, and 620c based on the information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c.

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

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

[0101] According to an embodiment, the image decoding device 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select one of the coding units 620a, 620b, and 620c based on a predetermined criterion. For example, the image decoding device 100 may select the coding unit 620b having a size different from the sizes of the other coding units from the coding units 620a, 620b, and 620c.

[0102] According to an embodiment, the image decoding device 100 may determine the width or height of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya) which are information indicating the position of the upper left sample 630a of the upper coding unit 620a, the coordinates (xb, yb) which are information indicating the position of the upper left sample 630b of the middle coding unit 620b, and the coordinates (xc, yc) which are information indicating the position of the upper left sample 630c of the lower coding unit. The image decoding device 100 may determine the respective sizes of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the image decoding device 100 may determine the width of the upper coding unit 620a as the width of the current coding unit 600. The image decoding device 100 may determine the height of the upper coding unit 620a as yb - ya. According to an embodiment, the image decoding device 100 may determine the width of the middle coding unit 620b as the width of the current coding unit 600. The image decoding device 100 may determine the height of the middle coding unit 620b as yc - yb. According to an embodiment, the image decoding device 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 width or height of the upper coding unit 620a and the middle coding unit 620b. The image decoding device 100 may determine a coding unit having a size different from the sizes of other coding units based on the determined widths and heights of the coding units 620a to 620c. Referring to Figure 6 , the image decoding device 100 may determine the middle coding unit 620b having a size different from the sizes of the upper coding unit 620a and the lower coding unit 620c as the coding unit at a predetermined position. However, the above method of determining, by the image decoding device 100, a coding unit having a size different from the sizes of other coding units corresponds only to an example of determining the coding unit at a predetermined position by using the sizes of coding units determined based on the coordinates of samples, and thus various methods of determining the coding unit at a predetermined position by comparing the sizes of coding units determined based on the coordinates of predetermined samples may be used.

[0103] The image decoding device 100 can determine the width or height of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd) which are information indicating the position of the upper left sample 670a of the left coding unit 660a, the coordinates (xe, ye) which are information indicating the position of the upper left sample 670b of the middle coding unit 660b, and the coordinates (xf, yf) which are information indicating the position of the upper left sample 670c of the right coding unit 660c. The image decoding device 100 can 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 positions of the coding units 660a, 660b, and 660c.

[0104] According to an embodiment, the image decoding device 100 can determine the width of the left coding unit 660a as xe - xd. The image decoding device 100 can determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 can determine the width of the middle coding unit 660b as xf - xe. The image decoding device 100 can determine the height of the middle coding unit 660b as the height of the current coding unit 600. According to an embodiment, the image decoding device 100 can 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 coding unit 660a and the middle coding unit 660b. The image decoding device 100 can determine a coding unit having a size different from the sizes of other coding units based on the determined widths and heights of the coding units 660a to 660c. Referring to Figure 6 , the image decoding device 100 can determine the middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as the coding unit at a predetermined position. However, the above method of determining a coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 only corresponds to an example of determining the coding unit at a predetermined position by using the size of the coding unit determined based on the coordinates of the sample, and thus various methods of determining the coding unit at a predetermined position by comparing the sizes of the coding units determined based on the coordinates of a predetermined sample can be used.

[0105] However, the position of the sample considered for determining the position of the coding unit is not limited to the above-mentioned upper left position, and information on any position of the sample included in the coding unit can be used.

[0106] According to an embodiment, the image decoding device 100 may select a coding unit at a predetermined position from an odd number of coding units determined by dividing the current coding unit while considering the shape of the current coding unit. For example, when the current coding unit has a non-square shape with a width greater than the height, the image decoding device 100 may determine a coding unit at a predetermined position along the horizontal direction. That is, the image decoding device 100 may determine one of the coding units at different positions along the horizontal direction and impose a restriction on the coding unit. When the current coding unit has a non-square shape with a height greater than the width, the image decoding device 100 may determine a coding unit at a predetermined position along the vertical direction. That is, the image decoding device 100 may determine one of the coding units at different positions along the vertical direction and may impose a restriction on the coding unit.

[0107] According to an embodiment, the image decoding device 100 may use information indicating the respective positions of an even number of coding units to determine a coding unit at a predetermined position from the even number of coding units. The image decoding device 100 may determine the even number of coding units by dividing (binary division) the current coding unit, and determine a coding unit at a predetermined position by using the information about the positions of the even number of coding units. The operations related thereto may correspond to the operations of determining a coding unit at a predetermined position (e.g., the center position) from an odd number of coding units that have been described in detail above, and thus the detailed description of the operations is not provided here. Figure 6 Already described in detail above, the operation of determining a coding unit at a predetermined position (e.g., the center position) from an odd number of coding units, and thus the detailed description of the operation is not provided here.

[0108] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, predetermined information about the coding unit at the predetermined position may be used in the division operation to determine a coding unit at the predetermined position from the plurality of coding units. For example, the image decoding device 100 may use at least one of the block shape information and the information about the division shape pattern stored in the samples included in the intermediate coding unit in the division operation to determine a coding unit at the center position from the plurality of coding units determined by dividing the current coding unit.

[0109] Refer to Figure 6, the image decoding device 100 may divide the current coding unit 600 into multiple coding units 620a, 620b, and 620c based on at least one of the block shape information and the information about the partitioning shape mode, and may determine the coding unit 620b at the center position from among the multiple coding units 620a, 620b, and 620c. In addition, the image decoding device 100 may determine the coding unit 620b at the center position in consideration of the position where at least one of the block shape information and the information about the partitioning shape mode is obtained. That is, at least one of the block shape information and the information about the partitioning shape mode of the current coding unit 600 may be obtained from the sample point 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into multiple coding units 620a, 620b, and 620c based on at least one of the block shape information and the information about the partitioning shape mode, the coding unit 620b including the sample point 640 may be determined as the coding unit at the center position. However, the information for determining the coding unit at the center position is not limited to at least one of the block shape information and the information about the partitioning shape mode, and various types of information may be used to determine the coding unit at the center position.

[0110] According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample point included in the coding unit to be determined. Refer to Figure 6 , the image decoding device 100 may use at least one of the block shape information and the information about the partitioning shape mode obtained from a sample point at a predetermined position (e.g., the sample point at the center position of the current coding unit) in the current coding unit 600 to determine the coding unit at the predetermined position (e.g., the coding unit at the center position among the multiple partitioned coding units) from among the multiple coding units 620a, 620b, and 620c determined by partitioning the current coding unit 600. That is, the image decoding device 100 may determine the sample point at the predetermined position by considering the block shape of the current coding unit 600, determine the coding unit 620b including the sample point from which predetermined information (e.g., at least one of the block shape information and the information about the partitioning shape mode) can be obtained from among the multiple coding units 620a, 620b, and 620c determined by partitioning the current coding unit 600, and may impose a predetermined restriction on the coding unit 620b. Refer to Figure 6 , according to an embodiment, the image decoding device 100 may determine the sample point 640 at the center position of the current coding unit 600 as the sample point from which predetermined information can be obtained, and may impose a predetermined restriction on the coding unit 620b including the sample point 640 during the decoding operation. However, the position of the sample point from which predetermined information can be obtained is not limited to the above position, and may include any position of the sample point included in the coding unit 620b to be determined for restriction.

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

[0112] According to an embodiment, when the current coding unit is divided into a plurality of coding units, the image decoding device 100 may use at least one of the block shape information and the information on the division shape pattern to determine a coding unit at a predetermined position from among the plurality of coding units. According to an embodiment, the image decoding device 100 may obtain at least one of the block shape information and the information on the division shape pattern from a sample at a predetermined position in the 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 information on the division shape pattern obtained from the samples at the predetermined positions in each of the plurality of coding units. That is, the coding units may be recursively divided based on at least one of the block shape information and the information on the division shape pattern obtained from the samples at the predetermined positions in each coding unit. The operation of recursively dividing the coding units has been described above, and thus a detailed description of the operation will not be provided here. Figure 5 The operation of recursively dividing the coding units has been described above, and thus a detailed description of the operation will not be provided here.

[0113] According to an embodiment, the image decoding device 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).

[0114] Figure 7 FIG. shows the order of processing a plurality of coding units when the image decoding device 100 determines the plurality of coding units by dividing the current coding unit according to an embodiment.

[0115] According to an embodiment, the image decoding device 100 may determine second coding units 710a and 710b by dividing a first coding unit 700 along a vertical direction, determine second coding units 730a and 730b by dividing the first coding unit 700 along a horizontal direction, or determine second coding units 750a to 750d by dividing the first coding unit 700 along both the vertical and horizontal directions, based on block shape information and information about a partitioning shape mode.

[0116] Referring Figure 7 , the image decoding device 100 may determine to process the second coding units 710a and 710b, determined by dividing the first coding unit 700 along the vertical direction, in a horizontal direction order 710c. The image decoding device 100 may determine to process the second coding units 730a and 730b, determined by dividing the first coding unit 700 along the horizontal direction, in a vertical direction order 730c. The image decoding device 100 may determine to process the second coding units 750a to 750d, determined by dividing the first coding unit 700 along both the vertical and horizontal directions, in a predetermined order for processing coding units in a row and then processing coding units in the next row (e.g., in a raster scan order or a zigzag scan order 750e).

[0117] According to an embodiment, the image decoding device 100 may recursively divide coding units. Referring Figure 7 , the image decoding device 100 may determine a plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d by dividing the first coding unit 700, and recursively divide each of the determined plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d. The method of dividing the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may correspond to the method of dividing the first coding unit 700. Thus, each of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may be independently divided into a plurality of coding units. Referring Figure 7 , the image decoding device 100 may determine second coding units 710a and 710b by dividing the first coding unit 700 along the vertical direction, and may determine to independently divide or not divide each of the second coding units 710a and 710b.

[0118] According to an embodiment, the image decoding device 100 may determine third coding units 720a and 720b by dividing a left second coding unit 710a along the horizontal direction, and may not divide a right second coding unit 710b.

[0119] According to an embodiment, the processing order of a coding unit may be determined based on an operation of dividing the coding unit. In other words, the processing order of the divided coding unit may be determined based on the processing order of the coding unit just before being divided. The image decoding device 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the left second coding unit 710a independently of the right second coding unit 710b. Since the third coding units 720a and 720b are determined by dividing the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b may be processed in the vertical direction order 720c. Since the left second coding unit 710a and the right second coding unit 710b are processed in the horizontal direction order 710c, the right second coding unit 710b may be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in the vertical direction order 720c. The operation of determining the processing order of a coding unit based on the coding unit before being divided is not limited to the above example, and various methods may be used to independently process the divided coding units determined to be of various shapes in a predetermined order.

[0120] Figure 8 Illustrates the process of determining that the current coding unit will be divided into an odd number of coding units when the coding units cannot be processed in a predetermined order, performed by the image decoding device 100 according to an embodiment.

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

[0122] According to an embodiment, the image decoding device 100 may determine whether any coding unit is divided into an odd number of coding units by determining whether the third coding units 820a and 820b and 820c to 820e can be processed in a predetermined order. Referring to Figure 8, the image decoding device 100 can determine the third coding units 820a, 820b, and 820c to 820e by recursively dividing the first coding unit 800. The image decoding device 100 can determine whether to divide any one of the first coding unit 800, the second coding units 810a and 810b, and the third coding units 820a, 820b, and 820c to 820e into an odd number of coding units based on at least one of the block shape information and the information about the division shape pattern. For example, the right second coding unit 810b among the second coding units 810a and 810b can be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the multiple coding units included in the first coding unit 800 can be a predetermined order (e.g., the zigzag scan order 830), and the image decoding device 100 can determine whether the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into an odd number of coding units satisfy the condition for processing in the predetermined order.

[0123] According to an embodiment, the image decoding device 100 can determine whether the third coding units 820a, 820b, and 820c to 820e included in the first coding unit 800 satisfy the condition for processing in the predetermined order, and the condition is related to whether at least one of the width and height of the second coding units 810a and 810b is divided into two halves along the boundaries of the third coding units 820a, 820b, and 820c to 820e. For example, the third coding units 820a and 820b determined when the height of the non-square left second coding unit 810a is divided into two halves can satisfy the condition. Since the boundaries of the third coding units 820c to 820e determined when the right second coding unit 810b is divided into three coding units cannot divide the width or height of the right second coding unit 810b into two halves, it can be determined that the third coding units 820c to 820e do not satisfy the condition. When the condition is not satisfied as described above, the image decoding device 100 can determine to break the scan order, and can determine that the right second coding unit 810b is divided into an odd number of coding units based on the determined result. According to an embodiment, when a coding unit is divided into an odd number of coding units, the image decoding device 100 can impose a predetermined restriction on the coding unit at a predetermined position among the divided coding units. The restrictions or predetermined positions have been described above with respect to various embodiments, so the detailed description of the restrictions or predetermined positions will not be provided here.

[0124] Figure 9 Illustrates the process of determining at least one coding unit by dividing the first coding unit 900 performed by the image decoding device 100 according to an embodiment.

[0125] According to an embodiment, the image decoding device 100 may divide the first coding unit 900 based on at least one of block shape information and information on a partitioning shape pattern obtained through the receiver 110. The first coding unit 900 having a square shape may be divided into four square coding units or may be divided into a plurality of non-square coding units. For example, referring to Figure 9 , when the block shape information indicates that the first coding unit 900 has a square shape and the information on the partitioning shape pattern indicates that the first coding unit 900 is to be divided into non-square coding units, the image decoding device 100 may divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the information on the partitioning shape pattern indicates that an odd number of coding units are to be determined by dividing the first coding unit 900 along the horizontal or vertical direction, the image decoding device 100 may divide the square first coding unit 900 into an odd number of coding units. For example, second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 along the vertical direction, or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 along the horizontal direction.

[0126] According to an embodiment, the image decoding device 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition for being processed in a predetermined order, and the condition is related to whether at least one of the width and height of the first coding unit 900 is divided in half along the boundaries of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to Figure 9, since the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the first coding unit 900 of the square in the vertical direction do not divide the width of the first coding unit 900 into two halves, it can be determined that the first coding unit 900 does not satisfy the condition for processing in a predetermined order. In addition, since the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the first coding unit 900 of the square in the horizontal direction do not divide the width of the first coding unit 900 into two halves, it can be determined that the first coding unit 900 does not satisfy the condition for processing in a predetermined order. When the above-mentioned condition is not satisfied as described above, the image decoding device 100 may decide to break the scanning order, and may determine that the first coding unit 900 is divided into an odd number of coding units based on the determined result. According to an embodiment, when a coding unit is divided into an odd number of coding units, the image decoding device 100 may impose a predetermined restriction on the coding unit at a predetermined position among the divided coding units. The above has described the restriction or the predetermined position with respect to various embodiments, and thus the detailed description of the restriction or the predetermined position will not be provided here.

[0127] According to an embodiment, the image decoding device 100 may determine coding units of various shapes by dividing the first coding unit.

[0128] Referring to Figure 9 , the image decoding device 100 may divide the first coding unit 900 of the square or the non-square first coding units 930 or 950 into coding units of various shapes.

[0129] Figure 10 It is shown that when the second coding unit having a non-square shape determined when the image decoding device 100 divides the first coding unit 1000 according to an embodiment satisfies a predetermined condition, the shape into which the second coding unit can be divided is restricted.

[0130] According to an embodiment, the image decoding device 100 may determine to divide the first square coding unit 1000 into non-square second coding units 1010a and 1010b or 1020a and 1020b based on at least one of the block shape information and the information on the partitioning shape pattern obtained through the receiver 110. The second coding units 1010a and 1010b or 1020a and 1020b may be independently divided. Thus, the image decoding device 100 may determine whether to 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 the block shape information and the information on the partitioning shape pattern of each of the second coding units 1010a and 1010b or 1020a and 1020b. According to an embodiment, the image decoding device 100 may determine the third coding units 1012a and 1012b by dividing the non-square left second coding unit 1010a determined by dividing the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the left second coding unit 1010a is divided in the horizontal direction, the image decoding device 100 may restrict the right second coding unit 1010b from being divided in the horizontal direction in which the left second coding unit 1010a is divided. When determining the third coding units 1014a and 1014b by dividing the right second coding unit 1010b in the same direction, since the left second coding unit 1010a and the right second coding unit 1010b are independently divided in the horizontal direction, the third coding units 1012a and 1012b or 1014a and 1014b may be determined. However, this situation is equivalent to the case where the image decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on at least one of the block shape information and the information on the partitioning shape pattern, and may be inefficient in terms of image decoding.

[0131] According to an embodiment, the image decoding device 100 may determine the third coding units 1022a and 1022b or 1024a and 1024b by dividing the non-square second coding unit 1020a or 1020b determined by dividing the first coding unit 1000 in the horizontal direction in the vertical direction. However, when the second coding unit (e.g., the upper second coding unit 1020a) is divided in the vertical direction, for the reasons described above, the image decoding device 100 may restrict the other second coding unit (e.g., the lower second coding unit 1020b) from being divided in the vertical direction in which the upper second coding unit 1020a is divided.

[0132] Figure 11Shows the process of dividing a square coding unit when the information on the division shape pattern cannot indicate that a coding unit that is not a square is divided into four square coding units, which is performed by the image decoding device 100 according to an embodiment.

[0133] According to an embodiment, the image decoding device 100 may determine the second coding units 1110a and 1110b or 1120a and 1120b, etc., by dividing the first coding unit 1100 based on at least one of the block shape information and the information on the division shape pattern. The information on the division shape pattern may include information on various methods of dividing a coding unit, but the information on various division methods may not include information for dividing a coding unit into four square coding units. According to such information on the division shape pattern, the image decoding device 100 may not divide the square first coding unit 1100 into four square second coding units 1130a, 1130b, 1130c, and 1130d. The image decoding device 100 may determine non-square second coding units 1110a and 1110b or 1120a and 1120b, etc., based on the information on the division shape pattern.

[0134] According to an embodiment, the image decoding device 100 may independently divide the non-square second 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 division method may correspond to the method of dividing the first coding unit 1100 based on at least one of the block shape information and the information on the division shape pattern.

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

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

[0137] Figure 12 It is shown that according to an embodiment, the processing order between a plurality of coding units may be changed according to the process of dividing the coding units.

[0138] According to an embodiment, the image decoding device 100 may divide the first coding unit 1200 based on the block shape information and the information on the division shape pattern. When the block shape information indicates a square shape and the information on the division shape pattern indicates dividing the first coding unit 1200 in at least one of the horizontal direction and the vertical direction, the image decoding device 100 may determine second coding units 1210a and 1210b or 1220a and 1220b, etc. by dividing the first coding unit 1200. Referring to Figure 12 , non-square second coding units 1210a and 1210b or 1220a and 1220b determined by dividing the first coding unit 1200 only in the horizontal direction or the vertical direction may be independently divided based on the block shape information of each coding unit and the information on the division shape pattern. For example, the image decoding device 100 may determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and may determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction. The operations of dividing the second coding units 1210a and 1210b or 1220a and 1220b have been described above with respect to Figure 11 and thus detailed descriptions of the operations will not be provided here.

[0139] According to an embodiment, the image decoding device 100 may process the coding units in a predetermined order. It has been described above with respect to Figure 7An operation of processing coding units in a predetermined order is described, and thus a detailed description of the operation will not be provided here. Refer to Figure 12 , the image decoding device 100 may determine four square third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d by dividing a first coding unit 1200 of a square. According to an embodiment, the image decoding device 100 may determine the processing order of the third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d based on the division method of the first coding unit 1200.

[0140] According to an embodiment, the image decoding device 100 may determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in a vertical direction in a horizontal direction, and may process the third coding units 1216a, 1216b, 1216c, and 1216d in the following processing order 1217: First, process the third coding units 1216a and 1216c included in the left second coding unit 1210a in a vertical direction, and then process the third coding units 1216b and 1216d included in the right second coding unit 1210b in a vertical direction.

[0141] According to an embodiment, the image decoding device 100 may determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing 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 the following processing order 1227: First, process the third coding units 1226a and 1226b included in the upper second coding unit 1220a in a horizontal direction, and then process the third coding units 1226c and 1226d included in the lower second coding unit 1220b in a horizontal direction.

[0142] Refer to Figure 12, the third coding units 1216a, 1216b, 1216c, 1216d and 1226a, 1226b, 1226c, 1226d of the square can be determined by separately dividing the second coding units 1210a and 1210b and 1220a and 1220b. Although the second coding units 1210a and 1210b are determined by dividing the first coding unit 1200 along the vertical direction and the second coding units 1220a and 1220b are determined by dividing the first coding unit 1200 along the horizontal direction, the third coding units 1216a, 1216b, 1216c, 1216d and 1226a, 1226b, 1226c, 1226d divided from the above second coding units finally show the coding units of the same shape divided from the first coding unit 1200. Thus, by recursively dividing the coding units in different ways based on at least one of the block shape information and the information about the division shape pattern, even if the coding units are finally determined to be of the same shape, the image decoding device 100 can process the multiple coding units in different orders.

[0143] Figure 13 Shows the process of determining the depth of coding units as the shape and size of the coding units change when recursively dividing the coding units such that multiple coding units are determined according to an embodiment.

[0144] According to an embodiment, the image decoding device 100 can determine the depth of the coding units based on a predetermined criterion. For example, the predetermined criterion can be the length of the long side of the coding unit. When the length of the long side of the coding unit before being divided is 2n times (n > 0) the length of the long side of the current coding unit after being divided, the image decoding device 100 can determine that the depth of the current coding unit increases by n from the depth of the coding unit before being divided. In the following description, the coding unit with an increased depth is represented as a coding unit with a deeper depth.

[0145] Refer to Figure 13, According to an embodiment, the image decoding device 100 may determine a second coding unit 1302 and a third coding unit 1304 with a deeper depth by dividing a first coding unit 1300 of a square shape based on block shape information indicating a square shape (e.g., the block shape information may be represented as "0:SQUARE"). Assuming that the size of the first coding unit 1300 of the square is 2N×2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 into 1 / 2 may have a size of N×N. In addition, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 into 1 / 2 may have a size of N / 2×N / 2. In this case, the width and height of the third coding unit 1304 are 1 / 4 times the width and height 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 whose width and height are 1 / 2 times the width and height of the first coding unit 1300 may be D+1, and the depth of the third coding unit 1304 whose width and height are 1 / 4 times the width and height of the first coding unit 1300 may be D+2.

[0146] According to an embodiment, the image decoding device 100 may determine a second coding unit 1312 or 1322 and a third coding unit 1314 or 1324 with a deeper depth by dividing a first coding unit 1310 or 1320 of a non-square shape based on block shape information indicating a non-square shape (e.g., the block shape information may be represented as "1:NS_VER" indicating a non-square shape with a height greater than a width, or may be represented as "2:NS_HOR" indicating a non-square shape with a width greater than a height).

[0147] The image decoding device 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 1310 having a size of N×2N. That is, the image decoding device 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 the horizontal direction, or may determine the second coding unit 1312 having a size of N / 2×N by dividing the first coding unit 1310 in both the horizontal and vertical directions.

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

[0149] According to an embodiment, the image decoding device 100 may determine a third coding unit 1304, 1314, or 1324 by dividing at least one of the width and height of a second coding unit 1302 having a size of N×N. That is, the image decoding device 100 may determine a third coding unit 1304 having a size of N / 2×N / 2, a third coding unit 1314 having a size of N / 4×N / 2, or a third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1302 in both the horizontal and vertical directions.

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

[0151] According to an embodiment, the image decoding device 100 may determine a third coding unit 1304, 1314, or 1324 by dividing at least one of the width and height of a second coding unit 1322 having a size of N×N / 2. That is, the image decoding device 100 may determine a third coding unit 1304 having a size of N / 2×N / 2 or a third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1322 in the vertical direction, or may determine a third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1322 in both the horizontal and vertical directions.

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

[0153] According to an embodiment, the width and height of the third coding unit 1314 or 1324 may be 1 / 4 times the width and height 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 having a width and height that are 1 / 2 times the width and height of the first coding unit 1310 or 1320 may be D+1, and the depth of the third coding unit 1314 or 1324 having a width and height that are 1 / 4 times the width and height of the first coding unit 1310 or 1320 may be D+2.

[0154] Figure 14 Illustrates the depth that can be determined based on the shape and size of the coding unit according to an embodiment and the partial index (PID) for distinguishing the coding unit.

[0155] According to an embodiment, the image decoding device 100 may determine second coding units of various shapes by dividing a square first coding unit 1400. Refer to Figure 14 , the image decoding device 100 may determine second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d by dividing the first coding unit 1400 in at least one of a vertical direction and a horizontal direction based on information about the division shape pattern. That is, the image decoding device 100 may determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d based on the information about the division shape pattern of the first coding unit 1400.

[0156] According to an embodiment, the depths of the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d determined based on the information about the partitioning shape pattern of the first square coding unit 1400 may be determined based on the length of the long side of the second coding unit. For example, since the side length of the first square coding unit 1400 is equal to the length of the long side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b may have the same depth (e.g., D). However, when the image decoding device 100 divides the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c, and 1406d based on the information about the partitioning shape pattern, since the side length of the square second coding units 1406a, 1406b, 1406c, and 1406d is 1 / 2 times the side length of the first coding unit 1400, the depth of the second coding units 1406a, 1406b, 1406c, and 1406d may be D + 1, that is, 1 deeper than the depth D of the first coding unit 1400.

[0157] According to an embodiment, the image decoding device 100 may determine a plurality of second coding units 1412a and 1412b and 1414a, 1414b, and 1414c by horizontally partitioning a first coding unit 1410 with a height greater than the width based on the information about the partitioning shape pattern. According to an embodiment, the image decoding device 100 may determine a plurality of second coding units 1422a and 1422b and 1424a, 1424b, and 1424c by vertically partitioning a first coding unit 1420 with a width greater than the height based on the information about the partitioning shape pattern.

[0158] According to an embodiment, the depths of the second coding units 1412a and 1412b and 1414a, 1414b, and 1414c or 1422a and 1422b and 1424a, 1424b, and 1406d determined based on the information about the partitioning shape pattern of the non-square first coding unit 1410 or 1420 may be determined based on the length of the long side of the second coding unit. For example, since the side length of the square second coding units 1412a and 1412b is 1 / 2 times the length of the long side of the first coding unit 1410 having a non-square shape with a height greater than the width, the depth of the square second coding units 1412a and 1412b is D + 1, that is, 1 deeper than the depth D of the non-square first coding unit 1410.

[0159] In addition, the image decoding device 100 may divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the information about the partitioning shape mode. The odd number of second coding units 1414a, 1414b, and 1414c may include non-square second coding units 1414a and 1414c and a square second coding unit 1414b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the side length of the square second coding unit 1414b are 1 / 2 times the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c may be D + 1, that is, 1 deeper than the depth D of the non-square first coding unit 1410. The image decoding device 100 may determine the depth of the coding units divided from the first coding unit 1420 having a non-square shape with a width greater than the height by using the method of determining the depth of the coding units divided from the first coding unit 1410 as described above.

[0160] According to an embodiment, when the sizes of the odd number of divided coding units are not equal, the image decoding device 100 may determine the PID for identifying the divided coding units based on the size ratio between the coding units. Refer to Figure 14 , among the odd number of divided coding units 1414a, 1414b, and 1414c, the coding unit 1414b at the central position may have a width equal to the width of the other coding units 1414a and 1414c and a height twice the height of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the central position may include two of the other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the central position is 1 based on the scanning order, the PID of the coding unit 1414c located immediately after the coding unit 1414b may increase by 2 and thus may be 3. That is, there may be a discontinuity in the PID values. According to an embodiment, the image decoding device 100 may determine whether the odd number of divided coding units do not have equal sizes based on whether there is a discontinuity in the PIDs for identifying the divided coding units.

[0161] According to an embodiment, the image decoding device 100 may determine whether to use a specific partitioning method based on the PID values for identifying the multiple coding units determined by partitioning the current coding unit. Refer to Figure 14, the image decoding device 100 may determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b, and 1414c by dividing a first coding unit 1410 having a rectangular shape with a height greater than the width. The image decoding device 100 may use the PID to identify each coding unit. According to an embodiment, the PID may be obtained from samples (e.g., upper left samples) at a predetermined position of each coding unit.

[0162] According to an embodiment, the image decoding device 100 may determine a coding unit at a predetermined position in the divided coding units by using the PID for differentiating coding units. According to an embodiment, when the information on the division shape pattern of the first coding unit 1410 having a rectangular shape with a height greater than the width indicates that the coding unit is divided into three coding units, the image decoding device 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding device 100 may assign the PID to each of the three coding units 1414a, 1414b, and 1414c. The video decoding device 100 may compare the PIDs of the odd number of divided coding units to determine the coding unit at the central position among these coding units. The image decoding device 100 may determine the coding unit 1414b having the PID corresponding to the median value among the PIDs of these coding units as the coding unit at the central position among the coding units determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding device 100 may determine the PID for differentiating the divided coding units based on the size ratio between the coding units. Refer to Figure 14, the coding unit 1414b generated by dividing the first coding unit 1410 may have a width equal to the widths of the other coding units 1414a and 1414c, and may have a height twice the heights of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c located immediately after the coding unit 1414b may be increased by 2 and may thus be 3. When the PID is increased unevenly as described above, the image decoding device 100 may determine that the coding unit is divided into a plurality of coding units including a coding unit having a size different from the sizes of the other coding units. According to an embodiment, when the information about the division shape mode indicates that the coding unit is divided into an odd number of coding units, the image decoding device 100 may divide the current coding unit in such a way that the coding unit at a predetermined position (e.g., the coding unit at the center position) among the odd number of coding units has a size different from the sizes of the other coding units. In this case, the image decoding device 100 may determine the coding unit at the center position having a different size by using the PID of the coding unit. However, the PID and the size or position of the coding unit at the predetermined position are not limited to the above examples, and various PIDs of the coding unit and various positions and sizes may be used.

[0163] According to an embodiment, the image decoding device 100 may use a predetermined data unit at which the coding unit starts to be recursively divided.

[0164] Figure 15 FIG. shows determining a plurality of coding units based on a plurality of predetermined data units included in a picture according to an embodiment.

[0165] According to an embodiment, the predetermined data unit may be defined as a data unit that starts to recursively divide the coding unit by using at least one of block shape information and information about a division shape mode. That is, the predetermined data unit may correspond to the coding unit of the highest depth for determining a plurality of coding units divided from the current picture. In the following description, for ease of explanation, the predetermined data unit is referred to as a reference data unit.

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

[0167] According to an embodiment, the image decoding device 100 may divide a current picture into a plurality of reference data units. According to an embodiment, the image decoding device 100 may divide the plurality of reference data units divided from the current picture by using information about a partitioning shape pattern of each reference data unit. The operation of partitioning the reference data units may correspond to a partitioning operation using a quadtree structure.

[0168] According to an embodiment, the image decoding device 100 may pre-determine a minimum size allowed for a reference data unit included in the current picture. Accordingly, the image decoding device 100 may determine various reference data units having a size equal to or greater than the minimum size, and may determine one or more coding units by referring to the determined reference data units by using block shape information and information about a partitioning shape pattern.

[0169] Referring to Figure 15 , the image decoding device 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined based on various data units (e.g., sequence, picture, slice, slice segment, largest coding unit, etc.) capable of including one or more reference coding units.

[0170] According to an embodiment, the receiver 110 of the image decoding device 100 may obtain at least one of reference coding unit shape information and reference coding unit size information about each of the various data units from a bitstream. The operation of dividing the square reference coding unit 1500 into one or more coding units has been described above with respect to the operation of Figure 3 partitioning the current coding unit 300, and the operation of dividing the non-square reference coding unit 1502 into one or more coding units has been described above with respect to the operation of Figure 4 partitioning the current coding unit 400 or 450. Accordingly, a detailed description of the operations will not be provided here.

[0171] According to an embodiment, the image decoding device 100 may use a PID for identifying the size and shape of a reference coding unit to determine the size and shape of the reference coding unit according to some data units determined previously based on a predetermined condition. That is, the receiver 110 may obtain from the bitstream only the PID for identifying the size and shape of the reference coding unit for each slice, slice segment, or largest coding unit of the data units (e.g., sequence, picture, slice, slice segment, largest coding unit, etc.) that satisfy the predetermined condition among various data units (e.g., data units having a size equal to or smaller than that of a slice). The image decoding device 100 may determine the size and shape of the reference data unit for 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 from and used in the bitstream according to each data unit having a relatively small size, the efficiency of using the bitstream may not be high, and thus, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the reference coding unit size information. In this case, at least one of the size and shape of the reference coding unit corresponding to the PID for identifying the size and shape of the reference coding unit may be determined in advance. That is, the image decoding device 100 may determine at least one of the size and shape of the reference coding unit included in the data unit used as the unit for obtaining the PID by selecting at least one of the size and shape of the reference coding unit determined in advance based on the PID.

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

[0173] Figure 16 A processing block showing a criterion for determining the determination order of the reference coding unit included in the picture 1600 according to an embodiment is shown.

[0174] According to an embodiment, the image decoding device 100 may determine one or more processing blocks divided from a picture. A processing block is a data unit including one or more reference coding units divided from a picture, and one or more reference coding units included in the processing block may be determined according to a specific order. That is, the determination order of one or more reference coding units determined in each processing block may correspond to one of various types of orders for determining reference coding units, and may vary according to the processing block. The determination order of reference coding units determined for each processing block may be one of various orders (e.g., raster scan order, zigzag scan, N-shaped scan, upper right diagonal scan, horizontal scan, and vertical scan), but is not limited to the above scan orders.

[0175] According to an embodiment, the image decoding device 100 may obtain processing block size information and may determine the sizes of one or more processing blocks included in a picture. The image decoding device 100 may obtain the processing block size information from a bitstream and may determine the sizes of one or more processing blocks included in the picture. The size of a processing block may be a predetermined size of a data unit indicated by the processing block size information.

[0176] According to an embodiment, the receiver 110 of the image decoding device 100 may obtain the processing block size information from the bitstream according to each specific data unit. For example, the processing block size information may be obtained from the bitstream according to data units (such as an image, a sequence, a picture, a slice, or a slice segment). That is, the receiver 110 may obtain the processing block size information from the bitstream according to each of various data units, and the image decoding device 100 may determine the sizes of one or more processing blocks divided from the picture by using the obtained processing block size information. The size of a processing block may be an integer multiple of the size of a reference coding unit.

[0177] According to an embodiment, the image decoding device 100 may determine the sizes of the processing blocks 1602 and 1612 included in the picture 1600. For example, the image decoding device 100 may determine the size of a processing block based on the processing block size information obtained from the bitstream. Refer to Figure 16 , according to an embodiment, the image decoding device 100 may determine the width of the processing blocks 1602 and 1612 to be four times the width of a reference coding unit, and may determine the height of the processing blocks 1602 and 1612 to be four times the height of a reference coding unit. The image decoding device 100 may determine the determination order of one or more reference coding units in one or more processing blocks.

[0178] According to an embodiment, the image decoding device 100 may determine processing blocks 1602 and 1612 included in the picture 1600 based on the size of the processing blocks, and may determine the determination order of one or more reference coding units in the processing blocks 1602 and 1612. In an embodiment, the operation of determining the reference coding unit may include an operation of determining the size of the reference coding unit.

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

[0180] According to an embodiment, the image decoding device 100 may obtain determination order information of reference coding units from a bitstream according to each specific data unit. For example, the receiver 110 may obtain determination order information of reference coding units from a bitstream according to each data unit (such as an image, a sequence, a picture, a slice, a slice segment, or a processing block). Since the determination order information of reference coding units indicates the order for determining reference coding units in a processing block, the determination order information may be obtained for each specific data unit including an integer number of processing blocks.

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

[0182] According to an embodiment, the receiver 110 may obtain determination order information of reference coding units from a bitstream as information related to the processing blocks 1602 and 1612, and the image decoding device 100 may determine the 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 included in the picture 1600 based on the determined order. Refer to Figure 16, the image decoding device 100 may determine the determination order 1604 and 1614 of one or more reference coding units in processing blocks 1602 and 1612, respectively. For example, when obtaining the determination order information of the reference coding units for each processing block, different types of determination order information of the reference coding units may be obtained for processing blocks 1602 and 1612. When the determination order 1604 of the reference coding units in processing block 1602 is the raster scan order, the reference coding units included in processing block 1602 may be determined according to the raster scan order. On the contrary, when the determination order 1614 of the reference coding units in another processing block 1612 is the backward raster scan order, the reference coding units included in processing block 1612 may be determined according to the backward raster scan order.

[0183] According to an embodiment, the image decoding device 100 may decode the determined one or more reference coding units. The image decoding device 100 may decode an image based on the determined reference coding units as described above. The method of decoding the reference coding units may include various image decoding methods.

[0184] According to an embodiment, the image decoding device 100 may obtain block shape information indicating the shape of the current coding unit or information about the partitioning shape mode indicating the partitioning method of the current coding unit from the bitstream, and may use the obtained information. The block shape information or the information about the partitioning shape mode may be included in the bitstream related to various data units. For example, the image decoding device 100 may use the block shape information or the information about the partitioning shape mode included in the sequence parameter set, the picture parameter set, the video parameter set, the slice header, or the slice segment header. In addition, the image decoding device 100 may obtain a syntax element corresponding to the block shape information or the information about the partitioning shape mode from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may use the obtained syntax element.

[0185] Hereinafter, a method for determining a partitioning rule according to an embodiment of the present disclosure will be described in detail.

[0186] The image decoding device 100 may determine the partitioning rule of the image. The partitioning rule may be determined in advance between the image decoding device 100 and the image coding device 2200. The image decoding device 100 may determine the partitioning rule of the image based on the information obtained from the bitstream. The image decoding device 100 may determine the partitioning rule based on the information obtained from at least one of the sequence parameter set, the picture parameter set, the video parameter set, the slice header, and the slice segment header. The image decoding device 100 may differently determine the partitioning rule according to a frame, a slice, a temporal layer, a maximum coding unit, or a coding unit.

[0187] The image decoding device 100 may determine a partitioning rule based on the block shape information of a coding unit. The image decoding device 100 may determine the block shape information of a coding unit. The block shape information may include the size, shape, aspect ratio, and direction information of the coding unit. The image encoding device 2200 and the image decoding device 100 may pre-determine a partitioning rule based on the block shape information of the coding unit. However, the embodiments are not limited thereto. The image decoding device 100 may determine a partitioning rule based on information obtained from a bitstream received from the image encoding device 2200.

[0188] 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 the same, the image decoding device 100 may determine the shape of the coding unit as a square. In addition, when the lengths of the width and height of the coding unit are different, the image decoding device 100 may determine the shape of the coding unit as a non-square.

[0189] The size of the coding unit may include various sizes, such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, and up to 256×256. The size of the coding unit may be classified based on the length of the long side, the length of the short side, or the area of the coding unit. The image decoding device 100 may apply the same partitioning rule to coding units classified into the same group. For example, the image decoding device 100 may classify coding units with the same length of the long side as having the same size. In addition, the image decoding device 100 may apply the same partitioning rule to coding units with the same length of the long side.

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

[0191] The image decoding device 100 may adaptively determine a partitioning rule based on the size of the coding unit. The image decoding device 100 may differently determine an allowable partitioning shape pattern based on the size of the coding unit. For example, the image decoding device 100 may determine whether partitioning is allowed based on the size of the coding unit. The image decoding device 100 may determine a partitioning direction according to the size of the coding unit. The image decoding device 100 may determine an allowable partitioning type according to the size of the coding unit.

[0192] The partitioning rule determined based on the size of the coding unit may be a partitioning rule pre-determined between the image encoding device 2200 and the image decoding device 100. In addition, the image decoding device 100 may determine a partitioning rule based on information obtained from the bitstream.

[0193] The image decoding device 100 may adaptively determine a partitioning rule based on the position of a coding unit. The image decoding device 100 may adaptively determine a partitioning rule based on the position of coding units in an image.

[0194] In addition, the image decoding device 100 may determine a partitioning rule such that coding units generated via different partitioning paths do not have the same block shape. However, the embodiment is not limited thereto, and coding units generated via different partitioning paths have the same block shape. Coding units generated via different partitioning paths may have different decoding processing orders. Since the decoding processing order has been described above with reference to Figure 12 the decoding processing order is not described in detail any further.

[0195] In addition, the image decoding device 100 may adaptively determine a partitioning rule based on information about a partitioning shape mode of an encoded frame (or slice) and information about a partitioning shape mode of peripheral blocks adjacent to a current block. Hereinafter, a method of determining the partitioning rule will be described with reference to Figures 17 to 24 in detail.

[0196] Figure 17 is a diagram for describing a method of determining a partitioning rule according to the size of a coding unit according to an embodiment of the present disclosure.

[0197] According to an embodiment of the present disclosure, the image decoding device 100 may allow an allowable size of a coding unit from a maximum M×N to a minimum P×Q. The image decoding device 100 and the image encoding device 2200 may pre-determine a minimum size or a maximum size of a coding unit. M, N, P, and Q may be positive integers. M and N may be the same value or different values. P and Q may be the same value or different values. M×N may include one of 256×256, 128×128, or 64×64. In addition, P×Q may include 4×4.

[0198] According to an embodiment of the present disclosure, the image decoding device 100 may obtain a maximum size or a minimum size of a coding unit from a bitstream. The image decoding device 100 may obtain a maximum size or a minimum size of a coding unit from a bitstream based on the length of a predetermined minimum size. The image decoding device 100 and the image encoding device 2200 may determine a predetermined minimum length of a coding unit as K. A new minimum size of a coding unit may be P×Q. A new maximum size of a coding unit may be M×N. To determine P, the image decoding device 100 may receive log2(A) from the bitstream. Here, the value of log2(A) is equal to log2(P) - log2(K). The image decoding device 100 may obtain P according to Equation 1 below.

[0199] [Equation 1]

[0200] P = 2^(log2(A) + log2(K))

[0201] The image decoding device 100 can determine Q, M, and N in the same way.

[0202] According to an embodiment of the present disclosure, the image decoding device 100 can obtain a new maximum size (M×N) of a coding unit based on the new minimum size of the coding unit. For example, when the image decoding device 100 obtains the length P of one side of the new minimum size of the coding unit according to Equation 1, the image decoding device 100 can obtain the length M of one side of the maximum size of the coding unit according to Equation 2.

[0203] [Equation 2]

[0204] M = 2^(log2(B) + log2(P))

[0205] Here, log2(B) is a value obtained by the image decoding device 100 from the bitstream and may be equal to log2(M) - log2(P).

[0206] According to an embodiment of the present disclosure, the image decoding device 100 can divide the largest coding unit into coding units of a first size. The image decoding device 100 can obtain coding units of the first size by dividing the largest coding unit. For example, when the current coding unit is the largest coding unit, the image decoding device 100 can obtain coding units of the first size by quad-partitioning the largest coding unit without a binary bitstring corresponding to the partitioning shape mode. Specifically, when the size of the current coding unit 1701 is 256×256 and the size 256×256 is the largest size of the coding unit, the image decoding device 100 can quad-partition the current coding unit 1701 into coding units 1702 with a size of 128×128.

[0207] The image decoding device 100 can divide the coding units of the first size into multiple coding units based on the partitioning rule and the binary bitstring corresponding to the partitioning shape mode. For example, the image decoding device 100 can divide the coding unit 1702 with a size of 128×128 obtained by quad-partitioning the coding unit with a size of 256×256 into multiple coding units based on the partitioning rule and the binary bitstring corresponding to the partitioning shape mode.

[0208] In addition, according to an embodiment of the present disclosure, when the size of the current coding unit is the same as the minimum size of the coding unit, the image decoding device 100 may no longer divide the current coding unit.

[0209] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine a division direction of a coding unit based on the size of the current coding unit. For example, when the length of the short side of the current coding unit is the same as the minimum length of one side of the coding unit, the image decoding device 100 may divide the current coding unit in the direction of the length of the long side of the current coding unit. For example, the minimum length of one side of the coding unit may be 4. The image decoding device 100 may perform a binary division on the coding unit 1711 with a size of 8×4 in the vertical direction to obtain coding units 1712 with a size of 4×4. When the coding unit with a size of 8×4 is divided into two in the horizontal direction, the length of the height of the coding unit is 2, and thus the image decoding device 100 may no longer allow division in the horizontal direction.

[0210] In addition, according to an embodiment of the present disclosure, when a non-square coding unit is divided into three, the image decoding device 100 may perform the three-way division in the direction of the long side of the coding unit. When a square coding unit is divided into three, the image decoding device 100 may perform the three-way division in any one of the horizontal direction or the vertical direction. For example, the image decoding device 100 may determine to perform a three-way division on the coding unit 1721 with a size of 32×8. Since the coding unit 1721 with a size of 32×8 is a coding unit with a long width, the image decoding device 100 may determine to divide the coding unit in the vertical direction. The image decoding device 100 may perform a three-way division in the vertical direction to obtain coding units 1722 and 1724 with a size of 8×8 and a coding unit 1723 with a size of 16×8.

[0211] In addition, the image decoding device 100 may determine to perform a three-way division on the coding unit with a size of 8×32. Since the coding unit 1731 with a size of 8×32 is a coding unit with a long height, the image decoding device 100 may determine to divide the coding unit in the horizontal direction. The image decoding device 100 may perform a three-way division in the horizontal direction to obtain coding units 1732 and 1734 with a size of 8×8 and a coding unit 1733 with a size of 8×16.

[0212] Figure 18 is a diagram for describing a division shape pattern according to an embodiment of the present disclosure.

[0213] The coding unit may be hierarchically divided based on information about the division shape pattern. The information about the division shape pattern may include at least one of information indicating whether division is performed, division direction information, and division type information. The division type may include at least one of binary division, three-way division, or four-way division.

[0214] The image decoding device 100 can perform binary partitioning on the coding units. Binary partitioning means partitioning one of the width or height of the coding unit. The coding unit 1801 with an aspect ratio of 1:1, the coding unit 1804 with an aspect ratio of 1:2, the coding unit 1805 with an aspect ratio of 2:1, and the coding unit with an aspect ratio of 1:4 or 4:1 can be bisected. The coding unit 1802 with an aspect ratio of 1:1, the coding unit 1803 with an aspect ratio of 1:2, the coding unit 1806 with an aspect ratio of 2:1, and the coding unit with an aspect ratio of 1:4 or 4:1 can be bisected.

[0215] The image decoding device 100 can perform ternary partitioning on the coding units. Ternary partitioning can mean partitioning the width or height of the coding unit in a ratio of 1:2:1. However, the embodiments are not limited thereto, and ternary partitioning can mean partitioning in a ratio of 1:1:2 or 2:1:1. The coding unit 1811 with an aspect ratio of 1:1, the coding unit 1813 with an aspect ratio of 1:2, the coding unit 1815 with an aspect ratio of 1:4, or the coding unit 1818 with an aspect ratio of 1:8 can be ternary partitioned along the horizontal direction. In addition, the coding unit 1812 with an aspect ratio of 1:1, the coding unit 1814 with an aspect ratio of 2:1, the coding unit 1816 with an aspect ratio of 4:1, or the coding unit 1817 with an aspect ratio of 8:1 can be ternary partitioned along the vertical direction.

[0216] The image decoding device 100 can perform quaternary partitioning on the coding units. Quaternary partitioning can mean bisecting both the width and height of the coding unit. At least one of the coding unit 1821 with an aspect ratio of 1:1, the coding unit with an aspect ratio of 1:2, the coding unit with an aspect ratio of 2:1, the coding unit with an aspect ratio of 1:4, the coding unit with an aspect ratio of 4:1, the coding unit with an aspect ratio of 1:8, and the coding unit with an aspect ratio of 8:1 can be quaternary partitioned.

[0217] The image decoding device 100 and the image encoding device 2200 can determine to use some of the multiple partitioning types. In other words, the image decoding device 100 and the image encoding device 2200 can determine the allowable partitioning types to be used for decoding and encoding the image. The allowable partitioning types can be predetermined between the image decoding device 100 and the image encoding device 2200. However, the embodiments are not limited thereto, and the image decoding device 100 can determine the allowable partitioning types based on the information obtained from the bitstream. For example, the image decoding device 100 can use all of binary partitioning, ternary partitioning, or quaternary partitioning. In addition, the image decoding device 100 can use binary partitioning or ternary partitioning. In addition, the image decoding device 100 can use binary partitioning or quaternary partitioning.

[0218] Hereinafter, with reference to Figure 19 a method for determining the partitioning rule will be described in more detail.

[0219] Figure 19 This is a diagram for describing a method of determining a partitioning rule according to an embodiment of the present disclosure.

[0220] Figure 19 Some partitioning rules allowed by the image decoding device 100 in Table 1900 according to an embodiment of the present disclosure are shown. The image decoding device 100 may determine an allowable aspect ratio of a coding unit. The image decoding device 100 and the image encoding device 2200 may pre-determine an allowable aspect ratio of a coding unit. For example, the image decoding device 100 may obtain a pre-determined allowable aspect ratio of a coding unit without information received from a bitstream. Referring to cell 1910, the image decoding device 100 may determine ratios 1:1, 1:2, 2:1, 1:4, 4:1, 1:8, and 8:1 as allowable ratios.

[0221] The image decoding device 100 may obtain an allowable aspect ratio based on information obtained from a bitstream. The allowable ratio may be 1:2^N or 2^N:1. Here, N is a positive integer including 0. For example, the image decoding device 100 may receive a flag from a bitstream to determine whether to use each of ratios 1:1, 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, and 16:1. For example, the image decoding device 100 may determine whether to use ratio 1:1 based on a flag indicating whether to use an aspect ratio 1:1 of a coding unit.

[0222] The image decoding device 100 may determine at least one allowable aspect ratio based on a received index or binary bit string. For example, the image decoding device 100 may group aspect ratios of a coding unit. The first group may include ratio 1:1. The second group may include ratios 1:1, 1:2, and 2:1. The third group may include ratios 1:1, 1:2, 2:1, 1:4, and 4:1. When the received index or binary bit string indicates the third group, the image decoding device 100 may determine ratios 1:1, 1:2, 2:1, 1:4, and 4:1 as allowable ratios. Referring to cell 1910, the image decoding device 100 may determine ratios 1:1, 1:2, 2:1, 1:4, 4:1, 1:8, and 8:1 as allowable ratios.

[0223] The image decoding device 100 may determine an allowable first range of the size of a coding unit according to the aspect ratio of the coding unit. The size of the coding unit may include at least one of the length of the width of the coding unit, the length of the height, the length of the long side, the length of the short side, or the area. The allowable first range of the size may include the minimum size or the maximum size of the coding unit. The image decoding device 100 may determine an allowable first range of the length of the long side of the coding unit according to the aspect ratio of the coding unit. The first range may include the maximum value and the minimum value of the length of the long side of the coding unit.

[0224] The image decoding device 100 and the image encoding device 2200 may pre-determine an allowable first range of the length of the long side of a coding unit according to the aspect ratio of the coding unit. Without information received from the bitstream, the image decoding device 100 may obtain the allowable first range of the length of the long side of the coding unit according to the pre-determined aspect ratio of the coding unit. The allowable first range of the length of the long side of the coding unit according to the aspect ratio of the coding unit may be as shown in cell 1930.

[0225] The image decoding device 100 may obtain the allowable first range of the length of the long side of the coding unit according to the aspect ratio of the coding unit based on the information received from the bitstream. The image decoding device 100 may determine the allowable first range of the length of the long side of the coding unit according to the aspect ratio of the coding unit as shown in cell 1930 based on the information obtained from the bitstream.

[0226] The information obtained from the bitstream may have an array format. For example, the image decoding device 100 may receive {{6,0},{5,1},{4,2},{0,0}}. The image decoding device 100 may obtain the allowable first range of the length of the long side of the coding unit according to the aspect ratio as shown in cell 1930 based on the received {{6,0},{5,1},{4,2},{0,0}}. {6,0} may indicate the first range of the long side of a coding unit with a ratio of 1:1. {5,0} may indicate the first range of the long side of a coding unit with a ratio of 1:2 or 2:1. {4,2} may indicate the first range of the long side of a coding unit with a ratio of 1:4 or 4:1. {0,0} may indicate the first range of the long side of a coding unit with a ratio of 1:8 or 8:1.

[0227] The image decoding device 100 may obtain the allowable first range of the length of the long side from the array based on Equation 1. For example, {6,0} may indicate the first range of the long side of a coding unit with a ratio of 1:1. Here, "6" may be information about the maximum value of the long side of a coding unit with a ratio of 1:1. In addition, "0" may be information about the minimum value of the long side of a coding unit with a ratio of 1:1. The image decoding device 100 may calculate 2^(6+log2(4)) based on Equation 1 to set 256 as the maximum value of the long side of the coding unit. Here, the pre-determined minimum size K of the coding unit may be 4. In addition, the image decoding device 100 may calculate 2^(0+log2(4)) according to Equation 1 to set 4 as the minimum value of the long side of the coding unit.

[0228] The image decoding device 100 may determine an allowable aspect ratio of a coding unit based on at least one of Equation 1, the maximum length of the long side of the coding unit, or the minimum length of the long side of the coding unit. The image decoding device 100 may obtain a first range of the length of the long side based on information obtained from a bitstream. The first range of the length of the long side of the coding unit may include the maximum length of the long side of the coding unit or the minimum length of the long side of the coding unit. The image decoding device 100 may obtain a range of the length of the short side based on the range of the length of the long side and the aspect ratio. When the maximum value or the minimum value of the length of the short side is less than a predetermined minimum size K of the coding unit, the image decoding device 100 may determine that the corresponding aspect ratio is not allowed. For example, when {0,0} indicates a range of the long side of a coding unit with an aspect ratio of 1:8 or 8:1, the image decoding device 100 may calculate 2^(0 + log2(4)) based on Equation 1 to set 4 as the maximum value of the long side of the coding unit. However, when the length of the long side of a coding unit with an aspect ratio of 1:8 or 8:1 is 4, the length of the short side needs to be 0.5. Since 0.5 is less than 4 which is the predetermined minimum size of the coding unit, the image decoding device 100 may determine that the aspect ratios 1:8 or 8:1 are not allowed.

[0229] The image decoding device 100 may determine whether information on a specific partitioning shape pattern is allowed based on a partitioning rule. For example, the image decoding device 100 may determine whether the first coding unit can be partitioned based on information on the first partitioning shape pattern. When the image decoding device 100 partitions the first coding unit according to the information on the first partitioning shape pattern, a second coding unit may be obtained. When the second coding unit does not satisfy at least one of "the allowable aspect ratio of the coding unit" or "the allowable range of the length of the long side of the coding unit according to the ratio", the image decoding device 100 may not allow the first partitioning shape pattern. On the other hand, when the second coding unit satisfies at least one of "the allowable aspect ratio of the coding unit" or "the allowable range of the length of the long side of the coding unit according to the ratio", the image decoding device 100 may allow the first partitioning shape pattern.

[0230] The image decoding device 100 may determine an allowable partitioning shape pattern of a coding unit. The image decoding device 100 and the image encoding device 2200 may predetermine an allowable partitioning shape pattern of the coding unit. The image decoding device 100 may obtain the predetermine allowable partitioning shape pattern of the coding unit without information received from the bitstream. Referring to cell 1920, the image decoding device 100 may determine bi-partitioning and tri-partitioning as allowable partitioning shape patterns. However, the embodiment is not limited thereto, and the image decoding device 100 may also determine quadri-partitioning as an allowable partitioning shape pattern.

[0231] The image decoding device 100 may obtain an allowable partitioning shape mode of a coding unit from a bitstream. The image decoding device 100 may determine whether to use each partitioning shape mode by receiving a flag from the bitstream. In addition, the image decoding device 100 may determine the allowable partitioning shape mode by receiving an index or a binary bit string. For example, with reference to cell 1920, the image decoding device 100 may allow binary partitioning and ternary partitioning. However, the embodiments are not limited thereto, and the image decoding device 100 may also determine a quaternary partitioning as an allowable partitioning shape mode.

[0232] The image decoding device 100 may determine an allowable second range of the size of a coding unit according to the partitioning shape mode of the coding unit. The size of the coding unit may include one of the length of the width of the coding unit, the length of the height, the length of the long side, the length of the short side, or the area. The allowable second range of the size may include the minimum size or the maximum size of the coding unit. The image decoding device 100 may determine an allowable second range of the length of the long side of the coding unit according to the partitioning shape mode of the coding unit. The image decoding device 100 and the image encoding device 2200 may pre-determine an allowable second range of the length of the long side of the coding unit according to the partitioning shape mode of the coding unit. The image decoding device 100 may obtain an allowable second range of the length of the long side of the coding unit according to the pre-determined partitioning shape mode of the coding unit without information received from the bitstream. The allowable second range of the length of the long side of the coding unit according to the partitioning shape mode may be as shown in cell 1940.

[0233] The image decoding device 100 may obtain an allowable second range of the length of the long side of the coding unit based on information received from the bitstream according to the partitioning shape mode of the coding unit. The information obtained from the bitstream may have an array format. For example, the image decoding device 100 may receive {{5,1},{4,2}}. The image decoding device 100 may obtain an allowable second range of the length of the long side of the coding unit based on the received {{5,1},{4,2}} according to the partitioning shape mode as shown in cell 1940. {5,1} may indicate the second range of the long side of the coding unit that can be binary-partitioned. {4,2} may indicate the second range of the long side of the coding unit that can be ternary-partitioned.

[0234] The image decoding device 100 may obtain an allowable second range of the length of the long side from the array based on Equation 1. For example, {5, 1} may indicate the second range of the long side of the coding unit that can be bipartitioned. Here, "5" may be information about the maximum value of the long side of the coding unit that can be bipartitioned. In addition, "1" may be information about the minimum value of the long side of the coding unit that can be bipartitioned. The image decoding device 100 may calculate 2^(5 + log2(4)) based on Equation 1 to set 128 as the maximum value of the long side of the coding unit. Here, the predetermined minimum size K of the coding unit may be 4. In addition, the image decoding device 100 may calculate 2^(1 + log2(4)) according to Equation 1 to set 8 as the minimum value of the long side of the coding unit.

[0235] The image decoding device 100 may change at least one of the partitioning rules based on the information obtained from the bitstream. The image decoding device 100 may determine to completely change the partitioning rules, change some of the partitioning rules, or not change the partitioning rules based on the information obtained from the bitstream. When the bitstream indicates to change some of the partitioning rules, the image decoding device 100 may obtain information about "the partitioning rules to be changed" and "the content of the partitioning rules" based on the information obtained from the bitstream. For example, "the partitioning rules to be changed" may be the maximum value of the length of the long side of the coding unit that can be bipartitioned. In addition, "the content of the partitioning rules" may be "4". The image decoding device 100 may determine the maximum value of the length of the long side of the coding unit that can be bipartitioned as 64 based on Equation 1.

[0236] The image decoding device 100 may determine whether to allow information about a specific partitioning shape pattern based on the partitioning rules. For example, the image decoding device 100 may determine that the length of the long side of the current coding unit does not satisfy the allowable range of the length of the long side of the coding unit according to the first partitioning shape pattern. The image decoding device 100 may determine that the information about the first partitioning shape pattern is not allowed for the current coding unit. On the other hand, the image decoding device 100 may determine that the length of the long side of the current coding unit satisfies the allowable range of the length of the long side of the coding unit according to the first partitioning shape pattern. The image decoding device 100 may determine that the information about the first partitioning shape pattern is allowed for the current coding unit.

[0237] Hereinafter, various embodiments of the partitioning rules will be described with reference to Figure 19 Describe various embodiments of the partitioning rules.

[0238] According to an embodiment of the present disclosure, when the size of the coding unit is less than a predetermined size, the image decoding device 100 may not allow tripartitioning. For example, referring to cell 1940, when the length of the long side of the current coding unit is less than 16, the image decoding device 100 may not allow tripartitioning for the current coding unit.

[0239] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine a partitioning rule such that a binary partitioning can be performed on coding units having a long side length ranging from a maximum of M to a minimum of N. Here, both M and N are positive integers. For example, the image decoding device 100 may determine the maximum length of the long side that can be binary partitioned to be 128. In addition, the image decoding device 100 may determine the minimum length of the long side that can be binary partitioned to be 8. In other words, the image decoding device 100 may allow binary partitioning for blocks of 128×128, 128×64, 64×128, ……, 64×64, 64×32, 32×64, 8×4, and 4×8.

[0240] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine a partitioning rule such that a binary partitioning can be performed on coding units having a long side length ranging from a maximum of 128 to a minimum of 8. In addition, the image decoding device 100 may determine a partitioning rule such that binary partitioning with a ratio of 1:1, a ratio of 1:2, and a ratio of 2:1 is allowed for the coding units. In this case, the image decoding device 100 may allow binary partitioning for coding units of sizes 128×128, 128×64, 64×128, 64×64, 64×32, 32×64, 32×32, ……, 16×8, 8×16, and 8×8.

[0241] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine a partitioning rule such that a binary partitioning can be performed on coding units having a long side length ranging from a maximum of 128 to a minimum of 8. In addition, the image decoding device 100 may determine a partitioning rule such that binary partitioning with a ratio of 1:1, a ratio of 1:2, a ratio of 2:1, a ratio of 1:4, and a ratio of 4:1 is allowed for the coding units. In this case, the image decoding device 100 may allow binary partitioning for coding units of sizes 128×128, 128×64, 128×32, 32×128, 64×128, ……, 16×16, 16×4, 4×16, and 8×8.

[0242] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine a partitioning rule such that a ternary partitioning is used only when the length of the long side of the coding unit is less than M. Here, M is a positive integer. For example, the image decoding device 100 may determine that a ternary partitioning is used only when the length of the long side of the coding unit is less than 32.

[0243] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine a partitioning rule such that a three-way partitioning is used only when the length of the long side of the coding unit is less than or equal to M and greater than or equal to N. Here, both M and N are positive integers. For example, referring to cell 1940, the image decoding device 100 may determine that a three-way partitioning is used only when the length of the long side of the coding unit is less than 64 and greater than 16.

[0244] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine a partitioning rule such that the current coding unit is partitioned into coding units with a ratio of 1:4 or a ratio of 4:1 only when the length of one side of the current coding unit is less than or equal to M and greater than or equal to N. Here, both M and N are positive integers.

[0245] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine a partitioning rule such that the current coding unit is partitioned into coding units with a ratio of 1:2 or a ratio of 2:1 only when one side of the current coding unit is less than or equal to M and greater than or equal to N. Here, both M and N are positive integers.

[0246] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine to use a four-way partitioning. The image decoding device 100 may allow a four-way partitioning for coding units with the length of the long side between M and N. Here, both M and N are positive integers. The image decoding device 100 may allow a four-way partitioning for coding units with the length of the long side between 128 and 8. The image decoding device 100 and the image encoding device 2200 may use predetermined M and N. However, the embodiment is not limited thereto. The image decoding device 100 may determine M and N based on information obtained from the bitstream.

[0247] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine to use a two-way partitioning. The image decoding device 100 may allow a two-way partitioning for coding units with the length of the long side between M and N. Here, both M and N are positive integers. For example, referring to cell 1920 and cell 1940, the image decoding device 100 may allow a two-way partitioning for coding units with the length of the long side ranging from 128 to 8. The image decoding device 100 and the image encoding device 2200 may use predetermined M and N. However, the embodiment is not limited thereto. The image decoding device 100 may determine M and N based on information obtained from the bitstream.

[0248] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine to use a three-partition. The image decoding device 100 may allow a three-partition for a coding unit whose long side length is between M and N. Here, both M and N are positive integers. For example, referring to cell 1920 and cell 1940, the image decoding device 100 may allow a three-partition for a coding unit whose long side length ranges from 64 to 16. The image decoding device 100 and the image encoding device 2200 may use predetermined M and N. However, the embodiment is not limited thereto. The image decoding device 100 may determine M and N based on information obtained from the bitstream.

[0249] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine to use a square coding unit. The image decoding device 100 may allow a square coding unit whose side length is between M and N. Here, both M and N are positive integers. For example, the image decoding device 100 may allow a square coding unit whose side length ranges from 128 to 4. The image decoding device 100 and the image encoding device 2200 may use predetermined M and N. However, the embodiment is not limited thereto. The image decoding device 100 may determine M and N based on information obtained from the bitstream.

[0250] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine to use a coding unit with an aspect ratio of 1:2 or 2:1. The image decoding device 100 may allow a coding unit whose long side length ranges from M to N and whose ratio is 1:2 or 2:1. Here, both M and N are positive integers. For example, referring to cell 1910 and cell 1930, the image decoding device 100 may allow a coding unit whose long side length ranges from 128 to 8 and whose ratio is 1:2 or 2:1. In other words, the allowable sizes of the coding unit may be 128×64, 64×128, 64×32, 32×64, 32×16, 16×32, 16×8, 8×16, 8×4, and 4×8. The image decoding device 100 and the image encoding device 2200 may use predetermined M and N. However, the embodiment is not limited thereto. The image decoding device 100 may determine M and N based on information obtained from the bitstream.

[0251] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine to use coding units with an aspect ratio of 1:4 or 4:1. The image decoding device 100 may allow coding units with the length of the long side ranging from M to N and an aspect ratio of 1:4 or 4:1. Here, both M and N are positive integers. For example, referring to cell 1910 and cell 1930, the image decoding device 100 may allow coding units with the length of the long side ranging from 64 to 16 and an aspect ratio of 1:4 or 4:1. In other words, the allowable sizes of the coding units may be 64×16, 16×64, 32×8, 8×32, 16×4, and 4×16. The image decoding device 100 and the image encoding device 2200 may use predetermined M and N. However, the embodiment is not limited thereto. The image decoding device 100 may determine M and N based on the information obtained from the bitstream.

[0252] In addition, according to an embodiment of the present disclosure, the image decoding device 100 may determine to use coding units with an aspect ratio of 1:8, 8:1, 1:16, or 16:1. The image decoding device 100 may allow coding units with the length of the long side ranging from M to N and an aspect ratio of 1:8, 8:1, 1:16, or 16:1.

[0253] The image decoding device 100 may define the complexity level of an image. The complexity level of an image may be the amount of bit resources required to display the image. In other words, when the complexity level of an image is high, the amount of bit resources required to display the image is large. In addition, when the complexity level of an image is low, the amount of bit resources required to display the image is small.

[0254] The image decoding device 100 may adaptively determine the partitioning rule based on the complexity level of the image. In other words, the partitioning rule may be determined for each complexity level of the image. The image decoding device 100 may determine the allowable partitioning shape patterns based on the complexity level of the image. The image decoding device 100 may divide the complexity level of the image into N levels. The image decoding device 100 may independently assign an allowable partitioning shape pattern to each of the N complexity levels of the image. The assigned allowable partitioning shape patterns may be the same as or different from each other. The image decoding device 100 may receive information about the complexity level of the image from the bitstream. The image decoding device 100 may determine the allowable partitioning shape patterns based on the received complexity level of the image.

[0255] For example, when the information received from the bitstream indicates the first complexity level, the image decoding device 100 may permit quad-division. When the information received from the bitstream indicates the second complexity level, the image decoding device 100 may permit quad-division and bi-division. When the information received from the bitstream indicates the third complexity level, the image decoding device 100 may permit quad-division, bi-division, and tri-division. The image decoding device 100 and the image encoding device 2200 may pre-determine the permitted partitioning shape modes according to the complexity level of the image. However, the embodiments are not limited thereto, and the image decoding device 100 may obtain the permitted partitioning shape modes according to the complexity level of the image from the bitstream.

[0256] The image decoding device 100 may determine the permitted block shape information based on the complexity level of the image. The image decoding device 100 may divide the complexity level of the image into N levels. The image decoding device 100 may assign the permitted block shape information to each of the N complexity levels of the image. The image decoding device 100 may receive the information about the complexity level of the image from the bitstream. The image decoding device 100 may determine the permitted block shape information based on the received complexity level of the image.

[0257] For example, when the information received from the bitstream indicates the first complexity level, the image decoding device 100 may permit a square coding unit. When the information received from the bitstream indicates the second complexity level, the image decoding device 100 may permit coding units with an aspect ratio of 1:1, 1:2, or 2:1. When the information received from the bitstream indicates the third complexity level, the image decoding device 100 may permit coding units with an aspect ratio of 1:1, 1:2, 2:1, 1:4, or 4:1. The image decoding device 100 and the image encoding device 2200 may pre-determine the permitted block shape information according to the complexity level of the image. However, the embodiments are not limited thereto, and the image decoding device 100 may obtain the permitted block shape information according to the complexity level of the image from the bitstream.

[0258] Figure 20 is a diagram for describing a method of determining a partitioning rule according to an embodiment of the present disclosure.

[0259] The image decoding device 100 may determine the partitioning rule based on the prediction mode. The prediction mode may include an intra mode and an inter mode. The image decoding device 100 and the image encoding device 2200 may use the pre-determined partitioning rule according to the prediction mode. However, the embodiments are not limited thereto. The image decoding device 100 may obtain the partitioning rule according to the prediction mode from the bitstream.

[0260] Referring to Table 2000, the image decoding device 100 may not allow coding units with an aspect ratio of 1:8 or 8:1 in the inter-frame mode. Referring to cell 2010, when the aspect ratio is 1:8 or 8:1, the image decoding device 100 may set the maximum allowable length and the minimum allowable length of the long side of the coding unit to 0. In other words, the image decoding device 100 may not allow coding units with an aspect ratio of 1:8 or 8:1.

[0261] Although not shown in Table 2000, even in the intra-frame mode, the image decoding device 100 may not allow coding units with an aspect ratio of 1:8 or 8:1.

[0262] Figure 24 It is a diagram for describing a method of dividing a current coding unit.

[0263] split_unit() may indicate the syntax for dividing a current coding unit. Information about the split shape mode (split_mode) may include at least one of information indicating whether to perform splitting, splitting direction information, and splitting type information. The information indicating whether to perform splitting indicates whether to split the current coding unit. The splitting direction information indicates splitting along one of the horizontal direction or the vertical direction.

[0264] The splitting type information indicates dividing the coding unit via one of binary splitting, ternary splitting, or quaternary splitting. Binary splitting means dividing one of the width or height of the coding unit into 1 / 2. Ternary splitting means dividing one of the width or height of the coding unit into 1:2:1. Quaternary splitting means dividing the width and height of the coding unit into 1 / 2 respectively.

[0265] For ease of description, in the present disclosure, information regarding a split shape mode (split_mode) is classified into information indicating whether splitting is performed, split direction information, and split type information, but is not limited thereto. Information regarding the split shape mode may be represented in combination with information indicating whether splitting is performed, split direction information, or split type information. For example, the information regarding the split shape mode (split_mode) may indicate that the current coding unit is not split (NO_SPLIT). In addition, the information regarding the split shape mode (split_mode) may include quad split (QUAD_SPLIT). In addition, the information regarding the split shape mode (split_mode) may indicate vertical bi-split (BI_VER_SPLIT). In addition, the information regarding the split shape mode (split_mode) may indicate horizontal bi-split (BI_HOR_SPLIT). In addition, the information regarding the split shape mode (split_mode) may indicate vertical tri-split (TRI_VER_SPLIT). In addition, the information regarding the split shape mode (split_mode) may indicate horizontal tri-split (TRI_HOR_SPLIT).

[0266] The image decoding device 100 may obtain information regarding the split shape mode based on a binary bit string. The image decoding device 100 may determine whether to split a coding unit, the split direction, and the split type based on the binary bit string.

[0267] A binary bit string is information in the form of binary numbers. The binary bit string may include at least one bit. The image decoding device 100 may determine the number of bits of the binary bit string based on the number of allowable split shape modes of the current coding unit. For example, the image decoding device 100 may determine that there are modes for splitting or not splitting the current coding unit. In other words, the number of allowable split shape modes of the current coding unit may be 2. The image decoding device 100 may determine information regarding the split shape mode of the coding unit based on a binary bit string of information regarding the split shape mode including one bit. This one bit may indicate whether splitting is performed. This bit may indicate no splitting (NO_SPLIT). When this bit indicates that splitting is performed, the image decoding device 100 may determine the split direction or split type based on the allowable split shape modes of the current coding unit.

[0268] In addition, when the number of allowable partition shape patterns from the current coding unit is 3, the image decoding device 100 may determine information about the partition shape pattern of the coding unit based on a binary bit string including 2 bits. The first bit of the binary bit string may indicate whether to perform partitioning. The second bit of the binary bit string may indicate the partition type or the partition direction. The image decoding device 100 may determine the partition direction or the partition type based on the allowable partition shape patterns of the current coding unit.

[0269] In addition, when the number of allowable partition shape patterns from the current coding unit is 4 or 5, the image decoding device 100 may partition the coding unit based on a binary bit string including 3 bits. The first bit of the binary bit string may indicate whether to perform partitioning. The second bit of the binary bit string may indicate the partition type or the partition direction. The third bit of the binary bit string may indicate the partition direction or the partition type. The image decoding device 100 may determine the partition direction or the partition type based on the allowable partition shape patterns of the current coding unit.

[0270] The image decoding device 100 may obtain information about the partition shape pattern from the bitstream, but is not limited thereto. The image decoding device 100 may determine information about the partition shape pattern based on the partitioning rules pre-agreed with the image coding device 2200. The image decoding device 100 may determine information about the pre-agreed partition shape pattern based on the size of the current coding unit. For example, the image decoding device 100 may determine the information about the partition shape pattern for the coding unit with the largest size as four-way split (QUAD_SPLIT). In addition, the image decoding device 100 may determine the information about the partition shape pattern for the coding unit with the smallest size as no split (NO_SPLIT).

[0271] Figure 21 is a table for describing a method of transmitting and receiving information about the partition shape pattern of a coding unit according to an embodiment of the present disclosure.

[0272] The image decoding device 100 may receive a bitstream from the image coding device 2200. The image decoding device 100 may obtain a binary bit string corresponding to the partition shape pattern from the bitstream. The image decoding device 100 may obtain information about the partition shape pattern based on the binary bit string. The image decoding device 100 may partition the current coding unit based on the information about the partition shape pattern.

[0273] The image decoding device 100 may obtain candidate partition shape patterns applicable to the current coding unit based on the partitioning rules. The image decoding device 100 may obtain candidate partition shape patterns applicable to the current coding unit by referring to Figure 19 Table 1900 of Figure 20 Table 2000 of

[0274] For example, the current coding unit may have a size of 64×32. Referring to Figure 19 , since the length of the long side of the current coding unit is 64, the image decoding device 100 may use binary partitioning and ternary partitioning. The image decoding device 100 may determine the case of not partitioning the current coding unit as the first candidate partitioning shape mode. The image decoding device 100 may determine the case of horizontally binary partitioning the current coding unit as the second candidate partitioning shape mode. The image decoding device 100 may determine the case of vertically binary partitioning the current coding unit as the third candidate partitioning shape mode. In addition, the image decoding device 100 may determine the case of vertically ternary partitioning the current coding unit as the fourth candidate partitioning shape mode. In addition, the image decoding device 100 may determine the case of horizontally ternary partitioning the current coding unit as the fifth candidate partitioning shape mode.

[0275] The image decoding device 100 may exclude from the candidate partitioning shape modes the partitioning shape modes that are not allowed in the partitioning rules. According to an embodiment of the present disclosure, the partitioning rules may determine to perform only ternary partitioning on the long side of the coding unit. Therefore, the image decoding device 100 may exclude from the candidate partitioning shape modes the fifth candidate partitioning shape mode of horizontally ternary partitioning the coding unit with a size of 64×32.

[0276] In addition, when partitioning the coding unit according to the partitioning shape mode and a coding unit with a block shape not allowed by the partitioning rules is derived, the image decoding device 100 may exclude the corresponding partitioning shape mode from the candidate partitioning shape modes. For example, the current coding unit may have a size of 64×16. When the current coding unit is horizontally ternary partitioned, the coding units after partitioning may have sizes of 64×8 and 64×4. In this case, 64×4 has a ratio of 16:1. Since according to Figure 19 Table 1900 of, 1:16 or 16:1 is not allowed in the partitioning rules, the image decoding device 100 may exclude the mode of horizontal ternary partitioning from the candidate partitioning shape modes.

[0277] The image decoding device 100 may determine information about the partitioning shape mode of the current coding unit based on at least one of the candidate partitioning shape modes, the binary bit string corresponding to the partitioning shape mode, and the block shape information of the current coding unit. Specifically, the image decoding device 100 may obtain the partitioning shape mode index of the current coding unit based on the number of candidate partitioning shape modes and the binary bit string corresponding to the partitioning shape mode. The image decoding device 100 may determine information about the partitioning shape mode of the current coding unit based on the block shape information of the current coding unit and the partitioning shape mode index.

[0278] As follows, the image decoding device 100 can obtain a partitioning shape mode index. The image decoding device 100 can obtain the number of candidate partitioning shape modes. In addition, the image decoding device 100 can obtain a binary bit string corresponding to the partitioning shape mode from the bitstream. In addition, the image decoding device 100 can determine the partitioning shape mode index of the current coding unit based on a table (or array). The table can include the value of the binary bit string according to the number of candidate partitioning shape modes and the partitioning shape mode index.

[0279] For example, the image decoding device 100 can obtain "110" as the binary bit string corresponding to the partitioning shape mode from the bitstream. The image decoding device 100 can obtain the partitioning shape mode index from the binary bit string based on Table 2120. As described above, the image decoding device 100 can determine that the current coding unit can have four candidate partitioning shape modes from the first candidate partitioning shape mode to the fourth candidate partitioning shape mode. Therefore, the image decoding device 100 can refer to column 2121 where the number of candidate partitioning shape modes is "4". The image decoding device 100 can obtain "2" as the partitioning shape mode index based on the binary bit string "110".

[0280] The image decoding device 100 can obtain information about the partitioning shape mode based on at least one of the partitioning shape mode index of the coding unit and the block shape information. The image decoding device 100 can obtain the block shape information of the current coding unit. The image decoding device 100 can select the information about the partitioning shape mode based on the obtained block shape information of the current coding unit. The image decoding device 100 can obtain the information about the partitioning shape mode based on a table (or array). The table can include the information about the partitioning shape mode according to the partitioning shape mode index of the coding unit and the block shape information. The block shape information can include the direction, size, shape, and aspect ratio of the coding unit.

[0281] For example, when the partitioning shape mode index is "2", the image decoding device 100 can refer to cell 2111 of Table 2110. The image decoding device 100 can determine that the current coding unit has a size of 64×32. Since the width of the current coding unit is longer than the height of the current coding unit, the image decoding device 100 can refer to the row indicated by "w>h". "w>h" can indicate that the current coding unit is in the horizontal direction. The image decoding device 100 can determine the information about the partitioning shape mode as horizontal binary partitioning.

[0282] The image decoding device 100 can partition the current coding unit based on the information about the partitioning shape mode. For example, when the size of the current coding unit is 64×32 and the partitioning shape mode is horizontal binary partitioning, the current coding unit can be partitioned into two coding units with a size of 64×16.

[0283] Referring to Table 2120, the image decoding device 100 and the image encoding device 2200 can adaptively use the bitstream based on the partitioning rules. The image decoding device 100 and the image encoding device 2200 can determine the number of bits used by the information on the partitioning shape mode based on the partitioning rules. For example, when the number of candidate partitioning shape modes is 5, the image decoding device 100 and the image encoding device 2200 generate the information on the partitioning shape mode by using 4 bits. However, when the number of candidate partitioning shape modes is 4, the information on the partitioning shape mode can be generated by using 3 bits. Since the image decoding device 100 and the image encoding device 2200 generate the bitstream while excluding the block shapes and partitioning shape modes not allowed according to the partitioning rules, the efficiency of the bits can be improved.

[0284] Figure 22 is a schematic block diagram of an image encoding device according to an embodiment.

[0285] The image encoding device 2200 may include an encoder 2210 and a bitstream generator 2220. The encoder 2210 may receive an input image and encode the input image. The bitstream generator 2220 may output a bitstream based on the encoded input image. In addition, the image encoding device 2200 may send the bitstream to the image decoding device 100. The detailed operations of the image encoding device 2200 will be described in detail with reference to Figure 23 The detailed operations of the image encoding device 2200 will be described in detail with reference to

[0286] Figure 23 is a flowchart of an image encoding method according to an embodiment.

[0287] Figure 23 relates to an image encoding method and includes content similar to the image decoding method and device described in Figures 3 to 21 and omits its repeated description.

[0288] The image encoding device 2200 determines the partitioning rules of the coding units (operation 2310). The image encoding device 2200 obtains a binary bit string corresponding to the partitioning shape mode for partitioning a coding unit into multiple coding units based on at least one of the partitioning rules and the information on the partitioning shape mode of the coding unit (operation 2320). The image encoding device 2200 generates a bitstream by performing entropy encoding on the binary bit string corresponding to the partitioning shape mode (operation 2330). The image encoding device 2200 determines an allowable range of the length of the long side of the coding unit according to the aspect ratio of the coding unit in order to determine the partitioning rules. The image encoding device 2200 determines an allowable range of the length of the long side of the coding unit according to the partitioning shape mode of the coding unit in order to determine the partitioning rules.

[0289] The image encoding device 2200 may perform entropy encoding on a binary bitstream corresponding to the partitioning shape mode of a current encoding unit using context - adaptive binary arithmetic coding (CABAC) or context - adaptive variable - length coding (CAVLC). The image encoding device 2200 may determine a context model for the binary bitstream based on the block shape information of the current encoding unit. In addition, the image encoding device 2200 may perform entropy encoding on the binary bitstream for the current encoding unit based on the context model. The image decoding device 100 may determine the context model based on the block shape information of the current encoding unit. In addition, the image decoding device 100 may obtain a binary bitstream corresponding to the partitioning shape mode of the current encoding unit by performing entropy decoding on the bitstream based on the context model.

[0290] The image encoding device 2200 may generate a bitstream based on a partitioning rule. However, the embodiment is not limited thereto, and the partitioning rule may be predetermined between the image encoding device 2200 and the image decoding device 100.

[0291] In addition, the partitioning shape mode may include at least one of a binary partition, a ternary partition, or a quaternary partition.

[0292] In addition, the image encoding device 2200 may divide a largest coding unit into coding units of a first size. The image encoding device 2200 may generate information on the partitioning shape mode for dividing the coding units of the first size into multiple coding units based on the partitioning rule.

[0293] The image encoding device 2200 may determine a partitioning rule for each complexity level of an image. The image encoding device 2200 may determine the complexity level by measuring the complexity of the image. The image encoding device 2200 may send the complexity level to the image decoding device 100 via the bitstream. The image decoding device 100 may determine the partitioning rule according to the complexity level. The partitioning rule according to the complexity level may be predetermined between the image encoding device 2200 and the image decoding device 100.

[0294] To obtain a binary bitstream related to the information on the partitioning shape mode, the image encoding device 2200 may obtain candidate partitioning shape modes applicable to the current encoding unit based on the partitioning rule. The image encoding device 2200 may obtain candidate partitioning shape modes applicable to the current encoding unit by referring to Figure 19 Table 1900 of Figure 20 or Table 2000 of

[0295] For example, the current encoding unit may have a size of 64×32. Referring to Figure 19, since the length of the long side of the current coding unit is 64, the image coding device 2200 can use binary partitioning and ternary partitioning. In addition, the image coding device 2200 can determine the case of not partitioning the current coding unit as the first candidate partitioning shape mode. The image coding device 2200 can determine the case of horizontally binary partitioning the current coding unit as the second candidate partitioning shape mode. The image coding device 2200 can determine the case of vertically binary partitioning the current coding unit as the third candidate partitioning shape mode. In addition, the image coding device 2200 can determine the case of vertically ternary partitioning the current coding unit as the fourth candidate partitioning shape mode.

[0296] The image coding device 2200 can obtain information about the partitioning shape mode of the current coding unit. The image coding device 2200 can encode the current coding unit according to various partitioning shape modes. The image coding device 2200 can select the best partitioning shape mode among various partitioning shape modes. The rate-distortion cost can be considered to select the best partitioning shape mode. The image coding device 2200 can obtain information about the partitioning shape mode based on the best partitioning shape mode.

[0297] The image coding device 2200 can obtain information about the partitioning shape mode based on at least one of the block shape information of the current coding unit, the candidate partitioning shape mode, and the partitioning shape mode.

[0298] The image coding device 2200 can determine the partitioning shape mode index based on the block shape information of the coding unit and the partitioning shape mode of the coding unit. For example, the image coding device 2200 can determine the partitioning shape mode of the current coding unit as horizontal binary partitioning. The image coding device 2200 can determine that the block shape information of the current coding unit is of the size 64×32. Referring to Table 2110, since the width of the current coding unit is longer than the height of the current coding unit, the image coding device 2200 can refer to the row indicated by "w>h". In addition, since the partitioning shape mode of the current coding unit is horizontal binary partitioning, the image coding device 2200 can determine the partitioning shape mode index as "2".

[0299] The image coding device 2200 can obtain information about the partitioning shape mode based on the partitioning shape mode index and the number of candidate partitioning shape modes. For example, as described above, the image coding device 2200 can determine that the current coding unit can have four candidate partitioning shape modes from the first candidate partitioning shape mode to the fourth candidate partitioning shape mode. Therefore, the image coding device 2200 can refer to column 2121 where the number of candidate partitioning shape modes is "4". The image decoding device 100 can obtain "110" as the information about the partitioning shape mode based on the partitioning shape mode index "2".

[0300] In the foregoing, various embodiments have been described. Those of ordinary skill in the art will understand that the present disclosure may be implemented in a modified form without departing from the essential features thereof. Accordingly, the embodiments should be considered in a descriptive sense only and not for purposes of limitation. The scope of the present disclosure is set forth in the claims rather than in the foregoing description, and all differences within the scope equivalent to the scope of the present disclosure should be construed as being included in the present disclosure.

[0301] Meanwhile, the above embodiments of the present disclosure can be written as a program executable on a computer and can be implemented in a general-purpose digital computer that operates the program using a computer-readable recording medium. The computer-readable recording medium includes storage media such as magnetic storage media (e.g., ROM, floppy disks, hard disks, etc.) or optical reading media (e.g., CD-ROM, DVD, etc.).

Claims

1. An image decoding method, comprising: obtaining first information from a bitstream, where the first information indicates a partitioning type of a coding unit among a quadtree partitioning type and a non - quadtree partitioning type including a ternary partitioning type; when determining that the partitioning type of the coding unit is a non - quadtree partitioning type using the first information, obtaining second information about a maximum size of a coding unit with a width - to - height ratio equal to 1:4, third information about a maximum size of a coding unit allowing the ternary partitioning type, and fourth information about a minimum size of a coding unit allowing the ternary partitioning type from the bitstream; determining the maximum size of a coding unit with a width - to - height ratio equal to 1:4 using the second information; determining the minimum size of a coding unit with a width - to - height ratio equal to 1:4; determining the maximum size of a coding unit allowing the ternary partitioning type using the third information; determining the minimum size of a coding unit allowing the ternary partitioning type using the fourth information; when determining that allowing the maximum size of a coding unit with a width - to - height ratio equal to 1:4, the minimum size of a coding unit with a width - to - height ratio equal to 1:4, the maximum size of a coding unit allowing the ternary partitioning type, and the minimum size of a coding unit allowing the ternary partitioning type divides the coding unit into three lower - layer coding units, dividing the coding unit into three lower - layer coding units and decoding the three lower - layer coding units; and when determining that the partitioning type of the coding unit is a quadtree partitioning type using the first information, dividing the coding unit into four lower - layer coding units and decoding the four lower - layer coding units.

2. An image decoding device, comprising: a receiver configured to: obtain first information from a bitstream, where the first information indicates a partitioning type of a coding unit among a quadtree partitioning type and a non - quadtree partitioning type including a ternary partitioning type, and when determining that the partitioning type of the coding unit is a non - quadtree partitioning type using the first information, obtain second information about a maximum size of a coding unit with a width - to - height ratio equal to 1:4, third information about a maximum size of a coding unit allowing the ternary partitioning type, and fourth information about a minimum size of a coding unit allowing the ternary partitioning type from the bitstream; a decoder configured to: determine the maximum size of a coding unit with a width - to - height ratio equal to 1:4 using the second information, determine the minimum size of a coding unit with a width - to - height ratio equal to 1:4, determine the maximum size of a coding unit allowing the ternary partitioning type using the third information, determine the minimum size of a coding unit allowing the ternary partitioning type using the fourth information, when determining that allowing the maximum size of a coding unit with a width - to - height ratio equal to 1:4, the minimum size of a coding unit with a width - to - height ratio equal to 1:4, the maximum size of a coding unit allowing the ternary partitioning type, and the minimum size of a coding unit allowing the ternary partitioning type divides the coding unit into three lower - layer coding units, divide the coding unit into three lower - layer coding units and decode the three lower - layer coding units, and When the partition type of the coding unit is determined to be a four - partition type using the first information, the coding unit is divided into four lower - layer coding units, and the four lower - layer coding units are decoded.

3. An image coding method, comprising: Determining the maximum size of a coding unit with a width - to - height ratio equal to 1:4, Determining the minimum size of a coding unit with a width - to - height ratio equal to 1:4; Determining the maximum size of a coding unit allowing a three - partition type; Determining the minimum size of a coding unit allowing a three - partition type; Determining the partition type of a coding unit among a four - partition type and a non - four - partition type including a three - partition type, When it is determined that the partition type of the coding unit is a four - partition type, dividing the coding unit into four lower - layer coding units and coding the four lower - layer coding units, and When it is determined that the coding unit can be divided into three lower - layer coding units using the maximum size of a coding unit with a width - to - height ratio equal to 1:4, the minimum size of a coding unit with a width - to - height ratio equal to 1:4, the maximum size of a coding unit allowing a three - partition type, and the minimum size of a coding unit allowing a three - partition type, dividing the coding unit into three lower - layer coding units and coding the three lower - layer coding units, and Coding first information indicating the partition type of the coding unit, and When it is determined that the partition type of the coding unit is a non - four - partition type, coding second information indicating the maximum size of a coding unit with a width - to - height ratio equal to 1:4, third information indicating the maximum size of a coding unit allowing a three - partition type, and fourth information indicating the minimum size of a coding unit allowing a three - partition type.

4. An image coding device, comprising: An encoder configured to: Determine the maximum size of a coding unit with a width - to - height ratio equal to 1:4, Determine the minimum size of a coding unit with a width - to - height ratio equal to 1:4; Determine the maximum size of a coding unit allowing a three - partition type, Determine the minimum size of a coding unit allowing a three - partition type, Determine the partition type of a coding unit among a four - partition type and a non - four - partition type including a three - partition type, When it is determined that the partition type of the coding unit is a four - partition type, divide the coding unit into four lower - layer coding units and code the four lower - layer coding units, and When it is determined that the coding unit can be divided into three lower - layer coding units using the maximum size of a coding unit with a width - to - height ratio equal to 1:4, the minimum size of a coding unit with a width - to - height ratio equal to 1:4, the maximum size of a coding unit allowing a three - partition type, and the minimum size of a coding unit allowing a three - partition type, divide the coding unit into three lower - layer coding units and code the three lower - layer coding units, a bit - stream generator configured to: Code first information indicating the partition type of the coding unit, and When it is determined that the partitioning type of the coding unit is a non-four-partitioning type, code the second information indicating the maximum size of a coding unit with an aspect ratio of width to height equal to 1:4, the third information indicating the maximum size of a coding unit allowing the three-partitioning type, and the fourth information indicating the minimum size of a coding unit allowing the three-partitioning type.

Citation Information

Patent Citations

  • Video-encoding method and video-encoding apparatus based on encoding units determined in accordance with a tree structure, and video-decoding method and video-decoding apparatus based on encoding units determined in accordance with a tree structure

    CN102948145A

  • Video encoding method and apparatus thereof and a video decoding method and apparatus thereof

    US20160037178A1