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

By dividing image blocks based on block partitioning type and orientation during image encoding and decoding, and combining block size and shape to determine prediction patterns, the problem of low coding efficiency in high-resolution images is solved, coding efficiency is improved and device complexity is reduced.

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

Patent Information

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

AI Technical Summary

Technical Problem

Existing image encoding and decoding technologies struggle to efficiently divide data units and determine prediction patterns when processing high-resolution or high-definition images, resulting in low encoding efficiency.

Method used

The image is divided based on the type and orientation of the block segmentation, and the prediction mode is determined by combining the size and shape of the block. The intra-frame mode or inter-frame mode is used, and further segmentation is performed according to the size and shape of the block. The segmentation is recursively performed using a predetermined segmentation type and orientation until a predetermined size is reached.

Benefits of technology

It improves the efficiency of image encoding and decoding, reduces the demand for memory bandwidth and computational complexity, and also reduces the complexity of image decoding devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115348444B_ABST
    Figure CN115348444B_ABST
Patent Text Reader

Abstract

Disclosed are an image encoding method and apparatus and an image decoding method and apparatus, the image decoding method comprising: determining at least one second block from a first block by dividing the first block based on at least one of a division type and a division direction of the first block included in the image; determining one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of a size and a shape of the at least one second block determined; obtaining a prediction block of a block included in the at least one second block based on one of the determined prediction mode and whether to divide the at least one second block; and restoring the block included in the at least one second block based on the prediction block of the block included in the at least one second block. Here, the division type represents one of two divisions, three divisions, and four divisions.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of application No. 201880045227.4, entitled “Image Coding Method and Device and Image Decoding Method and Device”, filed with the China Intellectual Property Office on July 6, 2018. Technical Field

[0002] The method and apparatus according to the embodiment can encode or decode an image by using coding units of various shapes included in the image. The method and apparatus according to the embodiment include an image encoding / decoding method and apparatus for obtaining a prediction block of a block included in the block based on at least one of the size and shape of the block. Background Art

[0003] With the development and popularization of hardware capable of reproducing and storing high-resolution or high-definition image content, the demand for codecs that efficiently encode or decode high-resolution or high-definition image content is increasing. The encoded image content is reproduced by being decoded. Recently, methods for efficiently compressing such high-resolution or high-definition image content have been implemented. For example, an effective image compression method is implemented by processing the image to be encoded by an arbitrary method.

[0004] In order to compress an image, various data units may be used, and there may be a containment relationship between the data units. In order to determine the size of the data unit used for image compression, the data unit may be divided by various methods, and an optimized data unit may be determined according to the characteristics of the image so that encoding and decoding of the image may be performed. Summary of the invention

[0005] According to the embodiment, the image decoding method includes: dividing the first block included in the image based on at least one of a division type and a division direction of the first block to determine at least one second block from the first block; determining one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block; obtaining a prediction block of a block included in the at least one second block based on one of the determined prediction mode and whether to divide the at least one second block; and reconstructing the block included in the at least one second block based on the prediction block of the block included in the at least one second block, wherein the division type represents one of two-division, three-division and four-division.

[0006] The step of determining a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when the size of the at least one second block is less than or equal to a predetermined size, determining the intra-frame mode as the prediction mode of the at least one second block.

[0007] The step of determining a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when the size of the at least one second block is greater than or equal to a predetermined size, determining the inter-frame mode as the prediction mode of the at least one second block.

[0008] The step of determining a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when the area of ​​the at least one second block is less than or equal to a predetermined value, determining the intra-frame mode as the prediction mode of the at least one second block.

[0009] The step of determining a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when the area of ​​the at least one second block is greater than or equal to a predetermined value, determining the inter-frame mode as the prediction mode of the at least one second block.

[0010] The step of determining one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when the sum of the height and the width of the at least one second block is less than or equal to a predetermined first value, determining the intra-frame mode as the prediction mode of the at least one second block; and when the sum of the height and the width of the at least one second block is greater than a predetermined second value, determining the inter-frame mode as the prediction mode of the at least one second block.

[0011] The step of determining a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when at least one of the determined height and width of the at least one second block is greater than or equal to a predetermined value, determining the inter-frame mode as the prediction mode of the at least one second block.

[0012] The step of determining one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when at least one of the determined height and width of the at least one second block is less than or equal to a predetermined value, determining the intra-frame mode as the prediction mode of the at least one second block.

[0013] The step of determining one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: determining the prediction mode of the at least one second block based on at least one of whether the at least one second block is non-square or square and a ratio of a height to a width of the at least one second block.

[0014] The step of determining one of a prediction mode of the at least one second block and whether to split the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when a slice including the at least one second block is an intra-frame slice and the size of the at least one second block is larger than a predetermined size, determining that the at least one second block is split, and the step of obtaining the prediction block of the block included in the at least one second block based on one of the determined prediction mode and whether to split the at least one second block may include: when it is determined that the at least one second block is split, splitting the second block based on at least one of a predetermined split type and a predetermined split direction to determine at least one third block; and when the at least one third block is smaller than or equal to the predetermined size, obtaining the prediction block of the at least one third block.

[0015] According to an embodiment, an image decoding device includes: a predictor, configured to divide the first block included in the image based on at least one of a division type and a division direction of the first block to determine at least one second block from the first block, determine one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of a determined size and a shape of the at least one second block, and obtain a prediction block of a block included in the at least one second block based on one of the determined prediction mode and whether to divide the at least one second block; and an image decoder, configured to reconstruct the block included in the at least one second block based on the prediction block of the block included in the at least one second block, wherein the division type represents one of two-division, three-division and four-division.

[0016] According to the embodiment, the image encoding method includes: dividing the first block included in the image based on at least one of the division type and the division direction of the first block to determine at least one second block from the first block; determining one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block, obtaining a prediction block of a block included in the at least one second block based on one of the determined prediction mode and whether to divide the at least one second block; and encoding the block included in the at least one second block based on the prediction block of the block included in the at least one second block, wherein the division type represents one of two-division, three-division and four-division.

[0017] The step of determining one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when the size of the at least one second block is less than or equal to a predetermined first size, determining the intra-frame mode as the prediction mode of the at least one second block; and when the size of the at least one second block is greater than or equal to a predetermined second size, determining the inter-frame mode as the prediction mode of the at least one second block.

[0018] The step of determining one of a prediction mode of the at least one second block and whether to divide the at least one second block based on at least one of the determined size and shape of the at least one second block may include: determining the prediction mode of the at least one second block based on at least one of whether the at least one second block is non-square or square and a ratio of a height to a width of the at least one second block.

[0019] The step of determining one of a prediction mode of the at least one second block and whether to split the at least one second block based on at least one of the determined size and shape of the at least one second block may include: when a slice including the at least one second block is an intra-frame slice and the size of the at least one second block is larger than a predetermined size, determining that the at least one second block is split, and the step of obtaining the prediction block of the block included in the at least one second block based on one of the determined prediction mode and whether to split the at least one second block may include: when it is determined that the at least one second block is split, splitting the second block based on at least one of a predetermined split type and a predetermined split direction to determine at least one third block; and when the at least one third block is smaller than or equal to the predetermined size, obtaining the prediction block of the at least one third block.

[0020] A computer program for an image decoding method according to an embodiment of the present disclosure may be recorded in a computer-readable recording medium. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1a is a block diagram of an image decoding apparatus according to various embodiments.

[0022] Figure 1b is a flowchart of an image decoding method according to various embodiments.

[0023] Figure 1c is a block diagram of an image decoder according to various embodiments.

[0024] Figure 2a is a block diagram of an image encoding apparatus according to various embodiments.

[0025] Figure 2b is a flowchart of an image encoding method according to various embodiments.

[0026] Figure 2c is a block diagram of an image encoder according to various embodiments.

[0027] Figure 3a to Figure 3f is a diagram for describing a process of partitioning a block based on a partition shape pattern and determining a prediction mode of the block based on the size of the block without obtaining information about the prediction mode from a bitstream, performed by the image decoding apparatus 100 according to an embodiment.

[0028] Figure 4 A pseudo code for the image decoding apparatus 100 to determine a prediction mode of a current block based on a size of the current block according to an embodiment is shown.

[0029] Figure 5 A process of determining at least one coding unit by splitting a current coding unit, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0030] Figure 6 A process of determining at least one coding unit by splitting coding units having a non-square shape, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0031] Figure 7 A process of splitting a coding unit based on at least one piece of block shape information and division shape pattern information, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0032] Figure 8 A method of determining a predetermined coding unit among odd-numbered coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0033] Fig. 9An order in which a plurality of coding units are processed when an image decoding apparatus splits a current coding unit to determine a plurality of coding units according to an embodiment is illustrated.

[0034] Fig.10 A process in which an image decoding apparatus determines that a current coding unit is split into an odd number of coding units when the current coding unit cannot be processed in a predetermined order according to an embodiment is illustrated.

[0035] Fig.11 A process in which an image decoding apparatus divides a first coding unit to determine at least one coding unit is illustrated.

[0036] Fig.12 It is shown that a shape in which the second coding unit may be divided is restricted when a non-square shaped second coding unit determined as the image decoding apparatus splits the first coding unit satisfies a predetermined condition in an image decoding apparatus according to an embodiment.

[0037] Fig.13 A process of splitting a square-shaped coding unit when information about a division shape mode cannot indicate that the square-shaped coding unit is split into four square-shaped coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0038] Fig.14 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of splitting a coding unit.

[0039] Fig.15 A process of determining a depth of a coding unit as a shape and a size of a coding unit change when a coding unit is recursively split so that a plurality of coding units are determined according to an embodiment is illustrated.

[0040] Fig.16 Depth that may be determined based on a shape and a size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.

[0041] Fig.17 It is illustrated that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment.

[0042] Fig.18 A processing block serving as a criterion for determining an order of determining reference coding units included in a picture according to an embodiment is illustrated. DETAILED DESCRIPTION

[0043] By referring to the embodiments described below in conjunction with the accompanying drawings, the advantages and features of the disclosed embodiments and the methods for achieving the advantages and features will be apparent. However, the present disclosure is not limited to these embodiments and can be implemented in many different forms, and the present embodiments are provided to make the present disclosure complete and to enable ordinary technicians in the field to understand the scope of the present disclosure.

[0044] The terms used in this specification will be briefly described, and the disclosed embodiments will be described in detail.

[0045] Although the general terms widely used in this specification are selected as the terms used in this disclosure while considering the functions of the present disclosure, the terms may change according to the intention of ordinary technicians in the field, judicial precedents, the emergence of new technologies, etc. It is also possible to use terms arbitrarily selected by the applicant of the present disclosure in specific cases. In this case, their meanings will be described in detail in the detailed description of the present disclosure. Therefore, it is necessary to define the terms based on the meaning and content of the terms in the entire specification, rather than defining the terms by simply stating the terms themselves.

[0046] It will be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise.

[0047] It will be understood that when a specific part “includes” a specific component, unless the context clearly specifies otherwise, the part does not exclude another component and may include another component.

[0048] As used herein, the term "component", "module" or "unit" represents a software or hardware component that performs a predetermined function. However, the term "component", "module" or "unit" is not limited to software or hardware. "Component", "module" or "unit" can be configured in an addressable storage medium, or can be configured to run on at least one processor. Therefore, as an example, "component", "module" or "unit" includes: component (such as software component, object-oriented software component, class component and task component), processor, function, attribute, program, subroutine, program code segment, driver, firmware, microcode, circuit, data, database, data structure, table, array and variable. The function provided in component and "component", "module" or "unit" can be combined into a smaller number of components and "components", "modules" and "units", or can be subdivided into other components and "components", "modules" or "units".

[0049] In an embodiment of the present disclosure, a "component", "module" or "unit" may be implemented as a processor and a memory. The term "processor" should be interpreted in a broad sense 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 embodiments, a "processor" may indicate an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field-programmable gate array (FPGA), etc. The term "processor" may indicate 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 coupled to a DSP core, or a combination of any other similar components.

[0050] The term "memory" should be interpreted broadly 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 RAM (NVRAM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage devices, registers, etc. When a processor can read information from and / or write information to a memory, the memory may be considered to be in electronic communication with the processor. Memory that is integrated into a processor is in electronic communication with the processor.

[0051] Hereinafter, an “image” may mean a static image such as a still image of a video or a moving image (that is, a dynamic image such as a video itself).

[0052] Hereinafter, a "sample" as data assigned to a sampling position of an image refers to data to be processed. For example, a pixel value in an image in a spatial domain and a transform coefficient on a transform domain may be a sample. A unit including at least one such sample may be defined as a block.

[0053] Hereinafter, a 'current block' may refer to a block of an image being encoded or decoded.

[0054] Hereinafter, the embodiments will be described in detail with reference to the accompanying drawings so that the present disclosure can be easily implemented by those skilled in the art to which the present disclosure belongs. In addition, in the accompanying drawings, parts related to the description will be omitted for simplicity of explanation.

[0055] In the following, reference will be made to Figures 1a to 18 An image encoding device, an image decoding device, an image encoding method, and an image decoding method according to an embodiment are described. Figures 5 to 18 A method for determining a data unit of an image according to an embodiment is described, and reference will be made to Figures 1a to 4An encoding / decoding method and apparatus for obtaining a prediction block of a block included in the block based on various types of coding units based on at least one of a size and a shape of the block according to an embodiment is described.

[0056] In the following, reference will be made to Figures 1a to 4 An encoding / decoding method and apparatus for obtaining a prediction block of a block included in the block based on at least one of a size and a shape of the block according to an embodiment of the present disclosure is described.

[0057] Figure 1a is a block diagram of an image decoding apparatus according to various embodiments.

[0058] The image decoding device 100 according to various embodiments may include a predictor 105 and an image decoder 110. The predictor 105 and the image decoder 110 may include at least one processor. In addition, the predictor 105 and the image decoder 110 may include a memory storing instructions to be executed by at least one processor. The image decoder 110 may be implemented as separate hardware from the predictor 105, or may include the predictor 105.

[0059] The obtainer (not shown) may obtain information about the block division shape mode from the bitstream. The information about the block division shape mode may be syntax element information about the block division shape mode. In this case, the information about the block division shape mode may include at least one of information about whether the block is divided, information about the division direction of the block, and information about the division type of the block. The information about the division direction of the block may be information indicating whether the block is divided in the horizontal direction or the vertical direction. The information about the division type of the block may be information indicating whether the block is divided into two or three. However, the information about the division shape model of the block may include information indicating whether the block is divided into four. In this case, the information about whether the block is divided in the information about the division shape mode may indicate that the block is divided, the information about the division direction of the block may indicate that the block is divided in both the horizontal direction and the vertical direction, and the information about the division type of the block may indicate that the block is divided into two.

[0060] However, the information about the division shape pattern may include information indicating whether the block is divided into four, the information about whether the block is divided in the information about the division shape pattern may indicate that the block is divided, there may be no information about the division direction of the block, and the information about the division type may indicate that the block is divided into four.

[0061] However, the information about the division shape mode obtained from the bitstream in the information about the division shape mode may not include information about the mode of dividing the block into four. That is to say. When the height and width of the current coding unit are equal to the height and width of the maximum coding unit, the division shape mode may be set to a mode of dividing the block into four, and the information about the division shape mode may not be obtained from the bitstream. In other cases except this case, the information about the division shape mode obtained from the bitstream may include a division shape mode of dividing the block into two in the horizontal direction, a division shape mode of dividing the block into three in the vertical direction, and a mode of not dividing the block.

[0062] The predictor 105 may split the first block included in the image based on at least one of a split type and a split direction of the first block to determine at least one second block from the first block.

[0063] The predictor 105 may divide the first block based on the information about the division shape pattern of the first block to determine at least one second block. That is, when the information about whether to divide the block in the information about the division shape pattern of the first block indicates that the first block is divided, the predictor 105 may divide the first block based on the information about the block division type included in the information about the division shape pattern of the first block and the information about the division direction of the block included in the information about the division shape pattern to determine at least one second block.

[0064] The predictor 105 may determine one of a prediction mode of at least one second block and whether to divide the at least one second block based on at least one of the size and shape of the at least one second block. When the prediction mode of the second block is determined based on at least one of the size and shape of the second block, the second block may be a block that is no longer divided based on the information about the division shape mode of the block. In addition, when determining whether to divide the second block based on the size and shape of the second block, the second block may be further divided.

[0065] When the size of at least one second block is less than or equal to the predetermined size (or less than the predetermined size), the predictor 105 may determine the intra mode as the prediction mode of the at least one second block. In this case, the predetermined size may be M×N (M and N are integers). M and N may be multiples of 4. For example, when the size of at least one second block is less than or equal to 4×4 as the predetermined size (or less than the predetermined size), the predictor 105 may determine the intra mode as the prediction mode of the second block.

[0066] When the size of at least one second block is greater than or equal to the predetermined size (or greater than the predetermined size), the predictor 105 may determine the inter-frame mode as the prediction mode of the at least one second block. In this case, the predetermined size may be M×N (M and N are integers). M and N may be multiples of 4. For example, when the size of at least one second block is greater than or equal to 64×64 as the predetermined size (or greater than the predetermined size), the predictor 105 may determine the inter-frame mode as the prediction mode of the second block.

[0067] When the area of ​​at least one second block is less than or equal to a predetermined value (or less than a predetermined value), the predictor 105 may determine the intra-mode as the prediction mode of the second block. The area of ​​the second block may be the product of the height and width of the second block. For example, when the area of ​​the second block is less than or equal to K (K is an integer) (or less than K), the predictor 105 may determine the intra-mode as the prediction mode of at least one second block. For example, when the area of ​​the second block is less than or equal to 16, the predictor 105 may determine the intra-mode as the prediction mode of the second block. In this case, the size of the second block may be less than or equal to 4×4. Optionally, the size of the second block may be one of 8×2, 2×8, 1×16, and 16×1.

[0068] When the area of ​​at least one second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 105 may determine the inter-frame mode as the prediction mode of at least one second block. For example, when the area of ​​the second block is greater than or equal to K (or greater than K), the predictor 105 may determine the inter-frame mode as the prediction mode of the second block. For example, when the area of ​​the second block is greater than or equal to 4096, the predictor 105 may determine the inter-frame mode as the prediction mode of the second block. In this case, the size of the second block may be greater than or equal to 64×64. Alternatively, the size of the second block may be one of 128×32, 32×128, 16×256, and 256×16.

[0069] When the sum of the height and the width of the second block is less than or equal to the predetermined value (or less than the predetermined value), the predictor 105 may determine the intra mode as the prediction mode of the second block. For example, when the sum of the height and the width of the second block is less than or equal to K (K is an integer) (or less than K), the predictor 105 may determine the intra mode as the prediction mode of the second block.

[0070] For example, when the sum of the height and the width of the second block is less than or equal to 8 (or less than 8), the predictor 105 may determine the intra mode as the prediction mode of the second block.

[0071] When the sum of the height and the width of the second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 105 may determine the inter mode as the prediction mode of the second block. For example, when the sum of the height and the width of the second block is greater than or equal to K (K is an integer) (or greater than K), the predictor 105 may determine the inter mode as the prediction mode of the second block. For example, when the sum of the height and the width of the second block is greater than or equal to 128 (or greater than 128), the predictor 105 may determine the inter mode as the prediction mode of the second block.

[0072] When at least one of the height and width of at least one second block is less than or equal to a predetermined value (or less than a predetermined value), the predictor 105 may determine the intra mode as the prediction mode of the second block. For example, when at least one of the height and width of the second block is less than or equal to a predetermined value K (K is an integer) (or less than a predetermined value K), the predictor 105 may determine the intra mode as the prediction mode of the second block. Here, K may be a multiple of 4. For example, when each of the height and width of the second block is less than or equal to 4, the predictor 105 may determine the intra mode as the prediction mode of the second block.

[0073] When at least one of the height and width of at least one second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 105 may determine the inter-frame mode as the prediction mode of the second block. For example, when at least one of the height and width of the second block is greater than or equal to a predetermined value K (K is an integer) (or greater than a predetermined value K), the predictor 105 may determine the inter-frame mode as the prediction mode of the second block. Here, K may be a multiple of 4. For example, when each of the height and width of the second block is greater than or equal to 64, the predictor 105 may determine the inter-frame mode as the prediction mode of the second block.

[0074] The predictor 105 may determine an intra mode or an inter mode as a prediction mode of at least one second block based on the shape of the second block. The predictor 105 may determine the prediction mode of at least one second block based on whether the at least one second block is non-square or square and at least one of the ratio of the height and width of the at least one second block. For example, when the at least one second block is non-square (that is, when the second block is not square), the predictor 105 may determine the prediction mode of the at least one second block as a predetermined prediction mode. For example, the predetermined prediction mode may be one of the intra mode or the inter mode. In this case, the image decoding device 100 may determine the prediction mode of the second block without obtaining information about the prediction mode of the second block from the bitstream. When the at least one second block is a square, the image decoding device 100 may obtain information about the prediction mode of the at least one second block from the bitstream so as to determine the prediction mode of the at least one second block, and determine the prediction mode of the second block based on the information about the prediction mode of the second block. However, it will be easily understood by a person of ordinary skill in the art that, when at least one second block is non-square, the predictor 105 may determine the prediction mode of at least one second block as a predetermined prediction mode without obtaining information about the prediction mode of the second block from the bitstream.

[0075] When the ratio of the height to the width of at least one second block is greater than or equal to (or greater than) a predetermined value K1 or less than or equal to (or less than) a predetermined value K2 (K1 and K2 are integers), the predictor 105 may determine the prediction mode of the second block as a predetermined prediction mode. For example, when the ratio of the height to the width of at least one second block is greater than 0 and less than or equal to 0.5 (or less than 0.5), the predictor 105 may determine the prediction mode of the second block as a predetermined prediction mode. When the ratio of the height to the width of at least one second block is greater than or equal to 2 (or greater than 2), the predictor 105 may determine the prediction mode of the second block as a predetermined prediction mode.

[0076] When the ratio of the height to the width of at least one second block is greater than or equal to 0.5 (or greater than 0.5) and less than or equal to 2 (or less than 2), the image decoding apparatus 100 may obtain information about the prediction mode of the second block from the bitstream, and determine the prediction mode of the second block based on the information about the prediction mode of the second block. However, it will be easily understood by those of ordinary skill in the art that the predictor 105 may determine the prediction mode of at least one second block as a predetermined prediction mode without obtaining information about the prediction mode of the second block from the bitstream.

[0077] The predictor 105 may determine the prediction mode of the second block in combination with the various embodiments described above. For example, when the height and width of the second block are respectively greater than or equal to M and N (or greater than M and N) (M and N are integers), the predictor 105 may determine the intra mode as the prediction mode of the second block, and when the height and width of the second block are respectively less than or equal to A and B (or less than A and B) (A and B are integers), the predictor 105 may determine the inter mode as the prediction mode of the second block. For example, when the height and width of the second block are greater than 64, the predictor 105 may determine the inter mode as the prediction mode of the second block, and when the height and width of the second block are less than or equal to 4, the predictor 105 may determine the intra mode as the prediction mode of the second block.

[0078] When a slice including the at least one second block is an intra slice, the predictor 105 may determine that the at least one second block is split based on at least one of a size and a shape of the at least one second block.

[0079] When a slice including the at least one second block is an intra slice and a size of the at least one second block is greater than or equal to a predetermined size (or greater than a predetermined size), the predictor 105 may determine that the at least one second block is split.

[0080] When a slice including the at least one second block is an intra slice and an area of ​​the at least one second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 105 may determine that the at least one second block is split.

[0081] When a slice including the at least one second block is an intra slice and a sum of a width and a height of the at least one second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 105 may determine that the at least one second block is split.

[0082] When a slice including the at least one second block is an intra slice and at least one of a width and a height of the at least one second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 105 may determine that the at least one second block is split.

[0083] At this time, the predictor 105 may divide the at least one second block based on at least one of a predetermined partition type and a predetermined partition direction to determine at least one third block. For example, the image decoding device 100 may divide the second block into four to determine at least one third block without obtaining information about the partition shape pattern of the second block from the bitstream. When the size of the third block is still greater than or equal to the predetermined size (or greater than the predetermined size), the image decoding device 100 may divide the at least one third block into four to determine the fourth block. That is, the block may be recursively divided based on at least one of a predetermined partition type and a predetermined partition direction until the size of the current block is less than or equal to the predetermined size (or less than the predetermined size).

[0084] The above description relates to the case where the predetermined partition type is four partitions. However, the predetermined partition type may be two partitions and the predetermined partition direction may be a horizontal direction and a vertical direction. In this case, it will be easily understood by a person of ordinary skill in the art that the block can be partitioned in the same manner. The above description relates to the case where the predetermined partition type is four partitions. However, the predetermined partition type or direction may be determined according to the shape of the current block. For example, when the current block is a rectangle with a long side extending in the horizontal direction, the predictor 105 may determine the partition direction as a vertical direction, and determine two partitions or three partitions as the predetermined partition type. Alternatively, when the current block is a rectangle with a long side extending in the vertical direction, the predictor 105 may determine the partition direction as a horizontal direction, and determine two partitions or three partitions as the predetermined partition type.

[0085] So far, the following case has been described in detail: when a slice including at least one second block is an intra-frame slice and the size of at least one second block is greater than or equal to a predetermined size (or greater than a predetermined size), the image decoding apparatus 100 may divide the at least one second block based on at least one of a predetermined division type and a predetermined division direction to determine at least one third block. However, it will be easily understood by those of ordinary skill in the art that when a slice including at least one second block is an intra-frame slice and the size of at least one second block is greater than or equal to a predetermined size (or greater than a predetermined size), the image decoding apparatus 100 may obtain information about a division shape pattern of the second block from a bitstream and divide the second block based on the division shape pattern of the second block to determine at least one third block.

[0086] The predictor 105 may obtain a prediction block of a block included in the at least one second block based on the prediction mode and whether the at least one second block is divided. The predictor 105 may determine the prediction mode of the at least one second block based on at least one of the size and shape of the at least one second block, and predict the second block based on the prediction mode of the second block to obtain a prediction block of the second block.

[0087] When the predictor 105 determines that at least one second block is divided based on at least one of the size and shape of the at least one second block, the predictor 105 may divide the second block to determine at least one third block, and perform prediction based on the prediction mode for the at least one third block to obtain a prediction block of the at least one third block.

[0088] The image decoding apparatus 100 may determine at least one of the minimum block and the maximum block based on at least one of a resolution of the image and a level of a codec.

[0089] As the level value of the codec increases, the size of the image may increase. In addition, since the resolution of the image corresponds to the size of the image, the size of the image may increase as the resolution of the image increases.

[0090] When the image is of large size, a large-sized minimum block may not have a great influence on encoding / decoding performance. Therefore, by determining the size of the minimum block according to the size of the image, an external memory bandwidth problem that may occur when encoding / decoding is performed by using a small-sized block (such as a 4×4-sized block) can be reduced. In addition, an excessive throughput can be prevented from being generated during the process of parsing a small-sized block.

[0091] That is, when the image encoding device transmits information about the size of the minimum block and the image decoding device parses the information about the size of the minimum block to determine the size of the minimum block, the image encoding / decoding device may be implemented by considering all possible sizes of the minimum block. However, when the size of the minimum block is determined based on at least one of the level of the codec and the resolution of the image, the image encoding / decoding device may be implemented to determine the size of the minimum block by considering only at least one of the level of the codec and the resolution of the image, thereby achieving a higher degree of efficiency.

[0092] For example, as shown in Table 1 below, the image decoding apparatus 100 may determine the size of the minimum block based on the level of the codec.

[0093]

Table 1

[0094] level Minimum block size (width or height) 1 4 2 4 3 4 4 8 5 8

[0095] For example, as shown in the following Table 2, the image decoding apparatus 100 may determine the minimum block area based on the level of the codec. The size of a block that may be used for decoding may be determined based on the minimum block area.

[0096]

Table 2

[0097] level Minimum block area (height*width) 1 16 2 16 3 16 4 32 5 32 6 64 7 64

[0098] In addition, the image decoding apparatus 100 may determine the size of the minimum block based on the resolution of the image. For example, the image decoding apparatus 100 may determine the size of the minimum block according to the resolution of the predetermined image. When the resolution of the predetermined image is 3840×2160, the image decoding apparatus 100 may determine the size of the minimum block to be one of M×N block sizes or larger block sizes (M and N are integers). When the image is of large size, the minimum block of large size may not have a great influence on the encoding / decoding performance. Therefore, by determining the size of the minimum block according to the size of the image, the problem of the bandwidth of the external memory that may occur when encoding / decoding is performed by using a small-sized block (such as a 4×4-sized block) can be reduced. In addition, excessive throughput generated during the process of parsing a small-sized block can be prevented. In addition, when the level value of the codec is less than or equal to a predetermined value, the image decoding apparatus 100 may determine the size of the maximum block to be a predetermined size (for example, 64×64). In addition, when the resolution of the image is lower than the predetermined resolution, the image decoding apparatus 100 may determine the size of the maximum block to be a predetermined size (for example, 64×64).

[0099] When 4×4 blocks, 4×8 blocks, and 8×4 blocks are allowed for decoding of luma components, the image decoding apparatus 100 may determine 2×2, 2×8, and 4×2 as the sizes of the blocks of the allowed chroma components corresponding to the blocks of the allowed luma components. When the image decoding apparatus 100 receives residual information (residual information about the transform coefficients of the blocks) for blocks of 2×N size (N is an integer) or N×2 size (N is an integer) and parses the residual information, excessive throughput may be generated. Therefore, when the current block is a block of 2×N size or N×2 size, the image decoding apparatus 100 may not obtain the residual information from the bitstream. For example, the image decoding apparatus 100 may determine the mode of the current block as the skip mode without obtaining a flag for the skip mode. When the image decoding apparatus 100 determines the mode of the current block as the skip mode, the image decoding apparatus 100 may not obtain the residual information from the bitstream and may not perform decoding.

[0100] In addition, when the current block is 2×N or N×2 and the mode of the current block is the inter mode, the image decoding apparatus 100 may determine a value of the coded block pattern information for the 2×N component or the N×2 component, a coded block flag (cbf_cb and cbf_cr), or a root_cbf to be 0. Here, the coded block pattern information, the coded block flag (cbf_cb and cbf_cr) information, or root_cbf may be information indicating whether all values ​​of transformation coefficients included in the block are 0.

[0101] When the image decoding apparatus 100 determines the value of the information to be 0, the image decoding apparatus 100 may not obtain residual information for the current block from the bitstream and may not perform decoding.

[0102] When the current block is 2×N or N×2 and the mode of the current block is the intra mode, the image decoding apparatus 100 may determine the value of the block pattern information for encoding of the 2×N or N×2 component to be 0. When the image decoding apparatus 100 determines the value of the information to be 0, the image decoding apparatus 100 may not obtain residual information for the current block from the bitstream and may not perform decoding.

[0103] The image decoder 110 may reconstruct a block included in at least one second block based on a prediction block of the block included in at least one second block. The image decoding apparatus 100 may obtain information about a residual of the block included in the second block from a bitstream, and perform inverse quantization / inverse transformation based on the information about the residual to obtain a residual block of the block included in the second block. Subsequently, the image decoder 110 may reconstruct a block included in at least one second block based on the residual block and the prediction block of the block included in at least one second block. That is, the image decoder 110 may sum the sample values ​​of the prediction block and the sample values ​​of the residual block for the block included in at least one second block to determine the sample values ​​of the reconstructed block.

[0104] Figure 1b is a flowchart of an image decoding method according to various embodiments.

[0105] In operation S105, the image decoding apparatus 100 may divide the first block based on at least one of a division type and a division direction of the first block included in the image to determine at least one second block from the first block. The image decoding apparatus 100 may obtain information about a division shape pattern of the first block from a bitstream, and when the information about the division shape pattern indicates that the first block is divided, the image decoding apparatus 100 may divide the first block based on at least one of a division type and a division direction included in the information about the division shape pattern to determine at least one second block from the first block.

[0106] In operation S110, the image decoding apparatus 100 may determine one of a prediction mode of at least one second block and whether to divide the at least one second block based on at least one of the size and shape of the at least one second block. The image decoding apparatus 100 may determine an intra mode or an inter mode as a prediction mode of the at least one second block based on at least one of the size and shape of the at least one second block. Alternatively, the image decoding apparatus 100 may determine that the second block is divided based on at least one of the size and shape of the at least one second block. When the image decoding apparatus 100 determines that the second block is divided, the image decoding apparatus may determine at least one third block by dividing the second block based on at least one of a predetermined division type and a predetermined division direction of the second block.

[0107] In operation S115, the image decoding apparatus 100 may obtain a prediction block of a block included in at least one second block based on one of a prediction mode and whether to partition at least one second block. The image decoding apparatus 100 may predict the second block based on the determined prediction mode to obtain a prediction block of the second block. Optionally, when the image decoding apparatus 100 determines to partition at least one second block, the image decoding apparatus 100 may partition the second block based on at least one of a predetermined partition type and a predetermined partition direction to determine at least one third block, and predict at least one third block based on the prediction mode to obtain a prediction mode of at least one third block.

[0108] In operation S120, the image decoding apparatus 100 may reconstruct a block included in the second block based on a prediction block of the block included in the second block. The image decoding apparatus 100 may obtain information about a residual of the block included in the second block from a bitstream, perform inverse quantization / inverse transform based on the information about the residual to obtain a residual block of the block included in the second block. Subsequently, the image decoder 110 may reconstruct a block included in at least one second block based on the residual block and the prediction block of the block included in at least one second block. That is, the image decoder 110 may add a sample value of a prediction block for a block included in at least one second block to a sample value of a residual block to determine a sample value of a reconstructed block.

[0109] Figure 1c is a block diagram of an image decoder 6000 according to various embodiments.

[0110] The image decoder 6000 according to various embodiments may perform tasks performed by the predictor 105 and the image decoder 110 of the image decoding apparatus 100 to decode image data.

[0111] Reference Figure 1c , the entropy decoder 6150 may parse the encoded image data to be decoded and the encoding information required for decoding from the bitstream 6050. The encoded image data may be a quantized transform coefficient, and the inverse quantizer 6200 and the inverse transform 6250 may reconstruct residual data from the quantized transform coefficient.

[0112] The intra predictor 6400 may perform intra prediction for each block. The inter predictor 6350 may perform inter prediction for each block using a reference image obtained from the reconstructed image buffer 6300. The prediction data for each block generated by the intra predictor 6400 and the inter predictor 6300 may be added to the residual data so that the data in the spatial domain of the block of the current image may be reconstructed. The deblocker 6450 and the SAO executor 6500 may perform loop filtering on the reconstructed data in the spatial domain to output a filtered reconstructed image 6600. In addition, the reconstructed image stored in the reconstructed picture buffer 6300 may be output as a reference image. Figure 1c The intra-frame predictor 6400 and the inter-frame predictor 6350 may be included in Figure 1a In the predictor 105.

[0113] In order for the image decoder 110 of the image decoding apparatus 100 to decode image data, a phased task of the image decoder 6000 according to various embodiments may be performed for each block.

[0114] Figure 2a is a block diagram of an image encoding apparatus according to various embodiments.

[0115] The image encoding apparatus 150 according to various embodiments may include a predictor 155 and an image encoder 160 .

[0116] The predictor 155 and the image encoder 160 may include at least one processor. In addition, the predictor 155 and the image encoder 160 may include a memory storing instructions to be executed by the at least one processor. The image encoder 160 may be implemented as separate hardware from the predictor 155, or may include the predictor 155.

[0117] The predictor 155 may divide the first block based on at least one of a division type and a division direction for the first block included in the image to determine at least one second block from the first block. The predictor 155 may perform encoding on the first block based on at least one of various division types and division directions for the first block, determine at least one of the division type and the division direction for the first block based on a coding rate and a distortion cost, and divide the first block based on at least one of the division type and the division direction for the first block to determine at least one second block from the first block.

[0118] The predictor 155 may determine one of a prediction mode of at least one second block and whether to divide at least one second block based on at least one of the size and shape of the at least one second block. When the prediction mode of the second block is determined based on at least one of the size and shape of the second block, the second block may be a block that is no longer divided. In addition, when whether to divide the second block is determined based on at least one of the size and shape of the second block, the second block may be further divided.

[0119] When the size of at least one second block is less than or equal to the predetermined size (or less than the predetermined size), the predictor 155 may determine the intra mode as the prediction mode of the at least one second block. In this case, the predetermined size may be M×N (M and N are integers). M and N may be multiples of 4. For example, when the size of at least one second block is less than or equal to 4×4 (or less than 4×4) as the predetermined size, the predictor 144 may determine the intra mode as the prediction mode of the second block.

[0120] When the size of at least one second block is greater than or equal to the predetermined size (or greater than the predetermined size), the predictor 155 may determine the inter-mode as the prediction mode of the at least one second block. In this case, the predetermined size may be M×N (M and N are integers). M and N may be multiples of 4. For example, when the size of at least one second block is greater than or equal to 64×64 as the predetermined size, the predictor 155 may determine the inter-mode as the prediction mode of the second block.

[0121] When the area of ​​at least one second block is less than or equal to a predetermined value (or less than a predetermined value), the predictor 155 may determine the intra-mode as the prediction mode of the second block. The area of ​​the second block may be the product of the height and width of the second block. For example, when the area of ​​the second block is less than or equal to K (K is an integer) (or less than K), the predictor 155 may determine the intra-mode as the prediction mode of at least one second block. For example, when the area of ​​the second block is less than or equal to 16 (or less than 16), the predictor 155 may determine the intra-mode as the prediction mode of the second block. In this case, the size of the second block may be less than or equal to 4×4. Optionally, the size of the second block may be one of 8×2, 2×8, 1×16, and 16×1.

[0122] When the area of ​​at least one second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 155 may determine the inter-frame mode as the prediction mode of at least one second block. For example, when the area of ​​the second block is greater than or equal to K (or greater than K), the predictor 155 may determine the inter-frame mode as the prediction mode of the second block. For example, when the area of ​​the second block is greater than or equal to 4096, the predictor 155 may determine the inter-frame mode as the prediction mode of the second block. In this case, the size of the second block may be greater than or equal to 64×64. Alternatively, the size of the second block may be one of 128×32, 32×128, 16×256, and 256×16.

[0123] When the sum of the height and the width of the second block is less than or equal to the predetermined value (or less than the predetermined value), the predictor 155 may determine the intra mode as the prediction mode of the second block. For example, when the sum of the height and the width of the second block is less than or equal to K (K is an integer) (or less than K), the predictor 155 may determine the intra mode as the prediction mode of the second block.

[0124] For example, when the sum of the height and the width of the second block is less than or equal to a predetermined value (or less than a predetermined value), the predictor 155 may determine the intra prediction mode as the prediction mode of the second block. For example, when the sum of the height and the width of the second block is less than or equal to K (K is an integer) (or less than K), the predictor 155 may determine the intra mode as the prediction mode of the second block. For example, when the sum of the height and the width of the second block is less than or equal to 8 (or less than 8), the predictor 155 may determine the intra mode as the prediction mode of the second block.

[0125] When the sum of the height and the width of the second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 155 may determine the inter mode as the prediction mode of the second block. For example, when the sum of the height and the width of the second block is greater than or equal to K (K is an integer) (or greater than K), the predictor 155 may determine the inter mode as the prediction mode of the second block. For example, when the sum of the height and the width of the second block is greater than or equal to 128 (or greater than 128), the predictor 155 may determine the inter mode as the prediction mode of the second block.

[0126] When at least one of the height and width of at least one second block is less than or equal to a predetermined value (or less than a predetermined value), the predictor 155 may determine the intra mode as the prediction mode of the second block. For example, when at least one of the height and width of the second block is less than or equal to a predetermined value K (K is an integer) (or less than a predetermined value K), the predictor 155 may determine the intra mode as the prediction mode of the second block. Here, K may be a multiple of 4. For example, when each of the height and width of the second block is less than or equal to 4, the predictor 155 may determine the intra mode as the prediction mode of the second block.

[0127] When at least one of the height and width of at least one second block is greater than or equal to a predetermined value (or greater than a predetermined value), the predictor 155 may determine the inter-frame mode as the prediction mode of the second block. For example, when at least one of the height and width of the second block is greater than or equal to a predetermined value K (K is an integer) (or greater than the predetermined value K), the predictor 155 may determine the inter-frame mode as the prediction mode of the second block. Here, K may be a multiple of 4. For example, when each of the height and width of the second block is greater than or equal to 64 (or greater than 64), the predictor 155 may determine the inter-frame mode as the prediction mode of the second block.

[0128] The predictor 155 may determine an intra mode or an inter mode as a prediction mode of the second block based on the shape of the at least one second block. The predictor 155 may determine the prediction mode of the at least one second block based on whether the at least one second block is non-square or square and at least one of the ratios of the height and width of the at least one second block. For example, when the at least one second block is non-square (that is, when the second block is not square), the predictor 155 may determine the prediction mode of the at least one second block as a predetermined prediction mode. For example, the predetermined prediction mode may be one of the intra mode or the inter mode. In this case, the image encoding device 150 may not encode information about the prediction mode of the second block. That is, the image encoding device 150 may not include information about the prediction mode of the second block in the bitstream.

[0129] When at least one second block is a square, the image encoding apparatus 150 may encode the second block based on a plurality of prediction modes and determine the prediction mode based on a rate-distortion cost. The image encoding apparatus 150 may encode information about the prediction mode of the second block based on the prediction mode and include the encoded information about the prediction mode of the second block in a bitstream.

[0130] However, the image encoder 150 may not encode information about the prediction mode of the second block. It will be easily understood by those of ordinary skill in the art that when at least one second block is non-square, the prediction mode of at least one second block may be determined as a predetermined prediction mode.

[0131] When the ratio of the height to the width of at least one second block is greater than or equal to a predetermined value K1 (or greater than the predetermined value K1) or less than or equal to a predetermined value K2 (or less than the predetermined value K2), the predictor 155 may determine the predetermined prediction mode as the prediction mode of the second block. For example, when the ratio of the height to the width of at least one second block is greater than 0 and less than or equal to 0.5 (or less than 0.5), the predictor 155 may determine the predetermined prediction mode as the prediction mode of the second block. When the ratio of the height to the width of at least one second block is greater than or equal to 2 (or greater than 2), the predictor 155 may determine the predetermined prediction mode as the prediction mode of the second block.

[0132] When the ratio of the height to the width of at least one second block is greater than or equal to 0.5 (or greater than 0.5) and less than or equal to 2 (or less than 2), the image encoding device 150 may encode the second block based on multiple prediction modes, and determine the prediction mode based on the rate-distortion cost. The image encoding device 150 may encode information about the prediction mode of the second block based on the prediction mode, and may include the encoded information about the prediction mode of the second block in the bitstream. However, it will be easily understood by a person of ordinary skill in the art that the image encoding device 150 may not encode the information about the prediction mode of the second block, and may determine a predetermined prediction mode as the prediction mode of at least one second block.

[0133] The predictor 155 may determine the prediction mode of the second block using a combination of the various embodiments described above. For example, when the height and width of the second block are respectively greater than or equal to M and N (M and N are integers) (or greater than M and N), the predictor 155 may determine the intra mode as the prediction mode of the second block, and when the height and width of the second block are respectively less than or equal to A and B (A and B are integers) (or less than A and B), the predictor 155 may determine the inter mode as the prediction mode of the second block. For example, when the height and width of the second block are greater than 64, the predictor 155 may determine the inter mode as the prediction mode of the second block, and when the height and width of the second block are less than or equal to 4, the predictor 155 may determine the intra mode as the prediction mode of the second block.

[0134] When the slice including at least one second block is an intra-frame slice and the size of at least one second block is greater than or equal to a predetermined size (or greater than a predetermined size), the predictor 155 may determine that the at least one second block is divided. In this case, the predictor 155 may divide the at least one second block based on at least one of a predetermined division type and a predetermined division direction to determine at least one third block. For example, the predictor 155 may divide the second block into four to determine at least one third block. When the size of the third block is still greater than or equal to the predetermined size (or greater than the predetermined size), the predictor 155 may again divide the at least one third block into four to determine a fourth block. That is, the predictor 155 may recursively divide the current block based on at least one of a predetermined division type and a predetermined division direction until the size of the current block is less than or equal to the predetermined size (or less than the predetermined size).

[0135] The above description relates to the case where the predetermined partition type is four partitions. However, the predetermined partition type may be two partitions and the predetermined partition direction may be a horizontal direction and a vertical direction. In this case, it will be readily understood by a person of ordinary skill in the art that the block may be partitioned in the same manner. The above description relates to the case where the predetermined partition type is four partitions. However, the predetermined partition type or direction is determined according to the shape of the current block. For example, when the current block is a rectangle with a long side extending in the horizontal direction, the predictor 155 may determine the vertical direction as the partition direction, and determine two or three partitions as the predetermined partition type. Alternatively, when the current block is a rectangle with a long side extending in the vertical direction, the predictor 155 may determine the horizontal direction as the partition direction, and determine two or three partitions as the predetermined partition type.

[0136] So far, the following case has been described in detail: when a slice including at least one second block is an intra-frame slice and the size of at least one second block is greater than or equal to a predetermined size (or greater than a predetermined size), the image encoding apparatus 150 may divide the at least one second block based on at least one of a predetermined division type and a predetermined division direction to determine at least one third block. However, it will be easily understood by those of ordinary skill in the art that when a slice including at least one second block is an intra-frame slice and the size of at least one second block is greater than or equal to a predetermined size (or greater than a predetermined size), the image encoding apparatus 150 may divide the second block according to various division shape modes, and determine the division shape mode of the second block from the various division shape modes based on a rate-distortion cost.

[0137] The predictor 155 may obtain a prediction block of a block included in the at least one second block based on the prediction mode and whether the at least one second block is split. The predictor 155 may determine the prediction mode of the at least one second block based on at least one of the size and shape of the at least one second block, and predict the at least one second block based on the prediction mode to obtain a prediction block of the second block.

[0138] When the predictor 155 determines that at least one second block is split based on at least one of the size and shape of the at least one second block, the predictor 155 may split the second block to determine at least one third block, and perform prediction based on the prediction mode of the at least one third block to obtain a prediction block of the at least one third block.

[0139] The image encoder 160 may encode the block included in the at least one second block based on the predicted block of the block included in the at least one second block. The image encoder 160 may generate a residual block of the block included in the second block based on the sample value of the original block of the block included in the at least one second block and the sample value of the predicted block of the block included in the at least one second block, and encode information about the sample value of the residual block.

[0140] When the block is split and the block to be predicted is determined, the image encoder 160 may encode information about a prediction mode of the block, include information about a predicted block of the block in a bitstream, and output the bitstream.

[0141] However, when a block is split, a block to be predicted is determined, and a prediction mode of the block is determined based on at least one of a size and a shape of the block, the image encoder 160 may not encode information about a prediction mode of the corresponding block.

[0142] The image encoder 160 may encode information about the division shape pattern of the block, include the encoded information about the division shape pattern of the block in a bitstream, and output the bitstream.

[0143] When the slice including the second block is an intra-frame slice, the image encoder 160 determines that the second block is divided based on at least one of the size and shape of the block, and the image encoder 160 divides the second block based on at least one of a predetermined division type and a predetermined division direction to determine at least one third block, the image encoder 160 may encode information about the division shape pattern of the second block, include the information about the division shape pattern of the second block in the bitstream, and output the bitstream. In this case, the information about the division shape pattern of the second block may indicate that the second block is not divided. The image decoding apparatus 100 may obtain information about the division shape pattern of the second block from the bitstream to determine at least one second block. The second block may be a block that is no longer divided based on the information about the division shape pattern obtained from the bitstream. In this case, the image decoding apparatus 100 may determine that the second block is divided based on at least one of the size and shape of the block, and divide the second block based on at least one of a predetermined division type and a predetermined division direction to determine at least one third block. In addition, the image decoding apparatus 100 may predict at least one third block according to a prediction mode. Therefore, when the current slice is an intra-frame slice, the image encoding device 150 can reduce the amount of information about the division shape mode to be explicitly signaled through the bit stream, and the image decoding device 100 can divide the block based on the information about the division shape mode received through the bit stream, and perform prediction based on the divided block like the image encoding device 150.

[0144] Figure 2bis a flowchart of an image encoding method according to various embodiments.

[0145] In operation S150, the image encoding apparatus 150 may split the first block included in the image based on at least one of a split type and a split direction of the first block to determine at least one second block from the first block.

[0146] In operation S155, the image encoding apparatus 150 may determine one of a prediction mode of the at least one second block and whether to split the at least one second block based on at least one of a size and a shape of the at least one second block.

[0147] In operation S160, the image encoding apparatus 150 may obtain a prediction mode of a block included in the at least one second block based on one of the prediction mode of the at least one second block and whether the at least one second block is split.

[0148] In operation S165, the image encoding apparatus 150 may encode a block included in the second block based on the prediction block of the block included in the at least one second block. The image encoding apparatus 150 may include the encoded information of the block included in the second block in a bitstream and output the bitstream.

[0149] Figure 2c is a block diagram of an image encoder according to various embodiments.

[0150] The image encoder 7000 according to various embodiments may perform tasks required to encode image data in the predictor 155 and the image encoder 160 of the image encoding apparatus 150 .

[0151] That is, the intra predictor 7200 may perform intra prediction for each block of the current image 7050 , and the inter predictor 7150 may perform inter prediction for each block using the current image 7050 and a reference image obtained from the reconstructed picture buffer 7100 .

[0152] Subsequently, the prediction data for each block output from the intra predictor 7200 or the inter predictor 7150 may be subtracted from the data for the block to be encoded in the current image 7050 to generate residual data. The transformer 7250 and the quantizer 7300 may perform transformation and quantization on the residual data to output a quantized transformation coefficient for each block. The dequantizer 7450 and the inverse transformer 7500 may perform dequantization and inverse transformation on the quantized transformation coefficient to reconstruct the residual data in the spatial domain. The reconstructed residual data in the spatial domain may be added to the prediction data for each block output from the intra predictor 7200 or the inter predictor 7150 and thus reconstructed as data in the spatial domain for the block of the current image 7050. The deblocker 7550 and the SAO executor 7600 may perform loop filtering on the reconstructed data in the spatial domain to generate a filtered reconstructed image. The generated reconstructed image may be stored in the reconstructed picture buffer 7100. The reconstructed image stored in the reconstructed picture buffer 7100 may be used as a reference image for inter prediction of other images. The entropy encoder 7350 may perform entropy encoding on the quantized transform coefficients and output the entropy encoded coefficients as a bitstream 7400 . Figure 2c The intra-frame predictor 7200 and the inter-frame predictor 7150 may be included in Figure 2a In the predictor 155.

[0153] For the image encoder 7000 according to various embodiments to be applied to the image encoding apparatus 150 , a phased task of the image encoder 7000 according to various embodiments may be performed for each block.

[0154] Figure 3a to Figure 3f is a diagram for describing a process of partitioning a block based on a partition shape pattern and determining a prediction mode of the block based on the size of the block without obtaining information about the prediction mode from a bitstream, performed by the image decoding apparatus 100 according to an embodiment.

[0155] Reference Figure 3a , the image decoding apparatus 100 may determine the division shape mode of the first block 200 based on the information about the division shape mode of the first block 200. In this case, the size of the first block 200 may be 8×8. The image decoding apparatus 100 may obtain the information about the division shape mode of the first block 200 from the bitstream. In this case, the information about the division shape mode of the first block 200 may indicate that the first block 200 is divided, and the information about the division type of the first block in the information about the division shape mode may indicate that the division type of the first block is four-division. The information about the division direction of the first block 200 in the information about the division shape mode may not exist or may indicate the horizontal direction and the vertical direction.

[0156] The image decoding apparatus 100 may divide the first block 200 into four second blocks 205 based on the division shape pattern of the first block 200. In this case, the size of each second block 205 may be 4×4. When the size of each second block 205 is 4×4, the image decoding apparatus 100 may determine the intra mode as the prediction mode of the second block 205 without obtaining information about the prediction mode of the second block 205 from the bitstream.

[0157] Reference Figure 3b , the image decoding apparatus 100 may determine the division shape mode of the first block 210 based on the information about the division shape mode of the first block 210. In this case, the size of the first block 210 may be 4×16. The image decoding apparatus 100 may obtain the information about the division shape mode of the first block 210 from the bitstream. In this case, the information about the division shape mode of the first block 210 may indicate that the first block 210 is divided, and the information about the division type of the first block in the information about the division shape mode may indicate that the division type of the first block 210 is four-division. The information about the division direction of the first block in the information about the division type mode may indicate a horizontal direction.

[0158] The image decoding apparatus 100 may divide the first block 210 into four second blocks 215 based on the division shape pattern of the first block 210. In this case, the size of each second block 215 may be 4×4. When the size of each second block 215 is 4×4, the image decoding apparatus 100 may determine the intra mode as the prediction mode of the second block 215 without obtaining information about the prediction mode of the second block 215 from the bitstream.

[0159] Reference Figure 3c , the image decoding apparatus 100 may determine the division shape mode of the first block 220 based on the information about the division shape mode of the first block 220. In this case, the size of the first block 220 may be 16×4. The image decoding apparatus 100 may obtain the information about the division shape mode of the first block 220 from the bitstream. In this case, the information about the division shape mode of the first block 220 may indicate that the first block 220 is divided, and the information about the division type of the first block 220 in the information about the division shape mode may indicate that the division type of the first block 220 is four-division. The information about the division direction of the first block 220 in the information about the division shape mode may indicate a vertical direction.

[0160] The image decoding apparatus 100 may divide the first block 220 into four second blocks 225 based on the division shape pattern of the first block 220. At this time, the size of each second block 225 may be 4×4. When the size of each second block 225 is 4×4, the image decoding apparatus 100 may determine the intra mode as the prediction mode of the second block 225 without obtaining information about the prediction mode of the second block 225 from the bitstream.

[0161] Reference Figure 3d , the image decoding apparatus 100 may determine the division shape mode of the first block 230 based on the information about the division shape mode of the first block 230. In this case, the size of the first block 230 may be 4×8. The image decoding apparatus 100 may obtain the information about the division shape mode of the first block 230 from the bitstream. In this case, the information about the division shape mode of the first block 230 may indicate that the first block 230 is divided, and the information about the division type of the first block 230 in the information about the division shape mode may indicate that the division type of the first block 230 is two-division. The information about the division direction in the information about the division shape mode may indicate a horizontal direction.

[0162] The image decoding apparatus 100 may divide the first block 230 into two second blocks 235 based on the division shape pattern of the first block 230. In this case, the size of each second block 235 may be 4×4. When the size of each second block 235 is 4×4, the image decoding apparatus 100 may determine the intra mode as the prediction mode of the second block 235 without obtaining information about the prediction mode of the second block 235 from the bitstream.

[0163] Reference Figure 3e , the image decoding apparatus 100 may determine the division shape mode of the first block 240 based on the information about the division shape mode of the first block 240. In this case, the size of the first block 240 may be 8×4. The image decoding apparatus 100 may obtain the information about the division shape mode of the first block 240 from the bitstream. In this case, the information about the division shape mode of the first block 240 may indicate that the first block 240 is divided, and the information about the division type of the first block 240 in the information about the division shape mode may indicate that the division type of the first block 240 is two-division. The information about the division direction in the information about the division shape mode may indicate a vertical direction.

[0164] The image decoding apparatus 100 may divide the first block 240 into two second blocks 245 based on the division shape pattern of the first block 240. In this case, the size of each second block 245 may be 4×4. When the size of each second block 245 is 4×4, the image decoding apparatus 100 may determine the intra mode as the prediction mode of the second block 245 without obtaining information about the prediction mode of the second block 245 from the bitstream.

[0165] Reference Figure 3f , the image decoding apparatus 100 may determine the division shape mode of the first block 250 based on the information about the division shape mode of the first block 250. In this case, the size of the first block 250 may be 16×4. The image decoding apparatus 100 may obtain the information about the division shape mode of the first block 250 from the bitstream. In this case, the information about the division shape mode of the first block 250 may indicate that the first block 250 is divided, and the information about the division type of the first block in the information about the division shape mode may indicate that the division type of the first block 250 is three-division. The information about the division direction in the information about the division shape mode may indicate a vertical direction.

[0166] The image decoding apparatus 100 may divide the first block 250 into the second block 255 and the third block 260 based on the division shape pattern of the first block 250. In this case, the size of each second block 255 may be 4×4, and the size of the third block 260 may be 8×4. When the size of each second block 255 is 4×4, the image decoding apparatus 100 may determine the intra mode as the prediction mode of the second block 255 without obtaining information about the prediction mode of the second block 255 from the bitstream. When the size of the third block 260 is greater than 4×4, the image decoding apparatus 100 may obtain information about the prediction mode of the third block 260 from the bitstream, and determine the intra mode or the inter mode as the prediction mode of the third block 260 based on the information about the prediction mode of the third block 260.

[0167] That is, the image decoding apparatus 100 may determine a prediction mode of a block based on the size of the block, thereby reducing the amount of prediction mode information to be explicitly signaled through a bitstream and reducing the complexity of the image decoding apparatus 100 while maintaining decoding performance.

[0168] So far, reference has been made to Figure 3a to Figure 3f The case where the image decoding apparatus 100 determines the intra mode as the prediction mode of the corresponding block when the size of the block is 4×4 is described in detail. However, it will be easily understood by those of ordinary skill in the art that the prediction mode of the block may be determined based on blocks of various sizes.

[0169] Figure 4A pseudo code for the image decoding apparatus 100 to determine a prediction mode of a current block based on a size of the current block according to an embodiment is shown.

[0170] Reference Figure 4 , when the size of the current block is not 4×4 or the type of the current slice is an inter-frame slice (if (the current slice type is an inter-frame slice && block size! = 4x4)), the image decoding device 100 may obtain a syntax element skip_flag indicating whether the current block is decoded according to the skip mode from the bitstream. When the syntax element skip_flag is 0, the image decoding device 100 may not decode the current block according to the skip mode. That is, when the mode of the current block is an inter-frame mode, the image decoding device 100 may derive the motion information of the current block by using information about the surrounding blocks (for example, by using an index of a piece of motion information representing the motion information of the surrounding blocks in time / space) and perform inter-frame prediction on the current block to obtain a prediction block of the current block. In addition, the image decoding device 100 may obtain information about the residual of the current block from the bitstream to perform decoding of the current block. Optionally, when the mode of the current block is an intra-frame mode, the image decoding device 100 may perform intra-frame prediction to obtain a prediction block of the current block. Also, the image decoding apparatus 100 may obtain information about a residual of a current block from a decoded bitstream to perform decoding of the current block.

[0171] When the syntax element information skip_flag is 1, the image decoding apparatus 100 may decode the current block according to the skip mode. The image decoding apparatus 100 may derive the motion information of the current block by using information about the surrounding blocks (for example, by using a merge index representing one piece of motion information of the surrounding blocks) and perform inter-frame prediction on the current block to obtain a prediction block of the current block. However, the image decoding apparatus 100 may perform decoding of the current block without obtaining information about the residual of the current block from the bitstream.

[0172] In other cases (that is, when the size of the current block is 4×4 or the type of the current slice is an intra-frame slice), the image decoding device 100 may determine the value of skip_flag to NO_SKIP (that is, 0) without obtaining the syntax element skip_flag indicating whether the current block is decoded according to the skip mode from the bitstream.

[0173] When the size of the current block is not 4×4 or the type of the current slice including the current block is an inter slice (if (the current slice type is an inter slice && block size != 4x4)), the image decoding device 100 may obtain the syntax element information pred_mode_flag representing the prediction mode of the current block from the bitstream. When the value of the syntax element information pred_mode_flag is 0, it may indicate that the prediction mode of the current block is an inter mode, and when the value of the syntax element information pred_mode_flag is 1, it may indicate that the prediction mode of the current block is an intra mode. In other cases (that is, when the size of the current block is 4×4 or the type of the current slice is an intra slice), the image decoding device 100 may determine the intra mode MODE_INTRA as the prediction mode pred_mode_flag of the current block. In this case, the size of the block available to the image decoding device 100 may be greater than or equal to 4×4. MODE_INTRA may indicate 1.

[0174] So far, reference has been made to Figure 4 The case where the image decoding apparatus 100 determines whether the mode of a block is a skip mode and determines the intra mode as the prediction mode of the corresponding block when the size of the block is 4×4 is described in detail. However, it will be easily understood by those of ordinary skill in the art that whether the mode of a block is a skip mode and the intra mode may be determined as the prediction mode of the corresponding block may be determined based on blocks of various sizes.

[0175] A general image decoding device obtains information about the prediction mode of the current block from a bitstream regardless of the size of the current block, and determines the prediction mode of the current block based on the information about the prediction mode of the current block. However, according to an embodiment of the present disclosure, the image decoding device 100 can adaptively determine the prediction mode of the current block based on the size of the current block without obtaining information about the prediction mode of the current block from the bitstream, thereby reducing the amount of prediction mode information to be explicitly signaled through the bitstream while maintaining decoding performance and reducing the complexity of the image decoding device 100.

[0176] In addition, according to an embodiment of the present disclosure, when the current slice is an intra slice and the size of the current block is greater than or equal to a predetermined size, the image decoding device 100 may further divide the current block based on at least one of a predetermined division direction and a predetermined division type without performing intra prediction on the current block, and perform intra prediction on the divided blocks, thereby reducing the amount of division shape pattern information to be explicitly signaled through a bitstream and reducing the complexity of the image decoding device 100.

[0177] The image encoding apparatus 150 according to various embodiments may reduce the amount of division shape mode information or the amount of prediction mode information to be explicitly signaled through a bitstream, and reduce the complexity of the image encoding apparatus 150 .

[0178] For example, when an image encoding device performs inter-frame prediction on a small-sized block according to an inter-frame mode, an external memory bandwidth greater than the external memory bandwidth required when a larger block is inter-frame predicted is required. In the case of inter-frame prediction, fractional pixel values ​​may be used, and in order to obtain the fractional pixel values, an interpolation filter of a K-tap size may be applied to integer pixels. When the size of the reference block of the area to which the interpolation filter is applied is M×N (M and N are integers), it may be necessary to extract pixel values ​​of an area of ​​size (M+K-1)×(N+K-1) larger than the size of the reference block from the memory. Therefore, when a small-sized block is inter-frame predicted, an external memory bandwidth greater than the external memory bandwidth required when a larger block is inter-frame predicted may be required. Therefore, by forcibly setting the prediction mode of a relatively small-sized block to an intra-frame mode rather than an inter-frame mode, a gain can be obtained in view of the external memory bandwidth requirement.

[0179] For example, an image encoding / decoding device may perform intra-frame prediction on a large-sized block. Since the residual value obtained by transforming / inverse transforming the residual generated based on the intra-frame prediction is generally larger than the residual value generated by the inter-frame prediction, the computational complexity of the transform / inverse transform task may increase as the size of the transform / inverse transform matrix increases. Therefore, by forcibly setting the prediction mode of a relatively large-sized block to an inter-frame mode rather than an intra-frame mode, a gain may be obtained in terms of computational complexity.

[0180] Hereinafter, an operation of splitting a coding unit according to an embodiment of the present disclosure will be described in detail.

[0181] The image may be divided in maximum coding units. The size of the maximum coding unit may be determined based on information obtained from a bitstream. The shape of the maximum coding unit may be a square of the same size. However, the embodiment is not limited thereto. In addition, the maximum coding unit may be hierarchically divided into coding units based on information about a division shape pattern obtained from a bitstream. The information about the division shape pattern may include at least one of information indicating whether to divide, division direction information, and division type information. The information indicating whether to divide may indicate whether to divide the coding unit. The division direction information may indicate one of a horizontal direction or a vertical direction in which the coding unit is divided. The division type information may indicate one of two divisions, three divisions, or four divisions in which the coding unit is divided.

[0182] For ease of description, the present disclosure describes a case where the information about the division shape mode is divided into information indicating whether to perform division, division direction information, and division type information, however, the present disclosure is not limited to this case. The image decoding device 100 may obtain the information about the division shape mode as an empty string from the bit stream. The image decoding device 100 may determine whether to perform division of the coding unit, the division direction, and the division type based on the empty string.

[0183] The coding unit may be smaller than or equal to the maximum coding unit. For example, when the information about the division shape pattern indicates that the coding unit is not divided, the coding unit may have the same size as the maximum coding unit. When the information about the division shape pattern indicates that the coding unit is divided, the maximum coding unit may be divided into coding units of a lower depth. In addition, when the information about the division shape pattern for the coding unit of the lower depth indicates division, the coding unit of the lower depth may be divided into coding units of a smaller size. However, the operation of dividing an image is not limited thereto, and the maximum coding unit may not be distinguished from the coding unit. Referring to Figures 5 to 18 The operation of dividing the coding unit is described in more detail.

[0184] In addition, the coding unit may be divided into prediction units for predicting an image. The prediction unit may be equal to or smaller than the coding unit. In addition, the coding unit may be divided into transformation units for transforming an image. The transformation unit may be equal to or smaller than the coding unit. The shape and size of the transformation unit may not be associated with the shape and size of the prediction unit. The coding unit may be distinguished from the prediction unit and the transformation unit, however, the coding unit, the prediction unit, and the transformation unit may be the same. The prediction unit and the transformation unit may be divided in the same manner as the coding unit. Referring to Figures 5 to 18 The operation of dividing the coding unit is described in more detail. The current block and surrounding blocks of the present disclosure may represent one of the maximum coding unit, the coding unit, the prediction unit, and the transformation unit. In addition, the current block or the current coding unit may be a block currently being decoded or encoded, or a block currently being divided. The surrounding blocks may be blocks reconstructed before the current block. The surrounding blocks may be adjacent to the current block in space or time. The surrounding blocks may be located at one of the lower left side, left side, upper left side, upper side, upper right side, right side, and lower right side of the current block.

[0185] Figure 5 A process of determining at least one coding unit by splitting a current coding unit, performed by the image decoding apparatus 100 according to an embodiment, is illustrated.

[0186] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, or N×4N, where N may be a positive integer. The block shape information may be information indicating at least one of a shape, a direction, a ratio or a size of a width and a height of a coding unit.

[0187] The shape of the coding unit may include a square or a non-square. When the length of the width of the coding unit is equal to the length of the height of the coding unit (that is, 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.

[0188] When the length of the width of the coding unit is different from the length of the height of the coding unit (that is, 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 ratio of the width and the height 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 to divide the coding unit in the horizontal direction or in the vertical direction based on the length of the width and the length of the height of the coding unit. In addition, the image decoding apparatus 100 may determine the size of the coding unit based on at least one of the length of the width of the coding unit, the length of the height of the coding unit, or the area of ​​the coding unit.

[0189] According to an embodiment, the image decoding apparatus 100 may determine the shape of the coding unit by using the block shape information, and may determine the division method of the coding unit by using the information about the division shape mode. That is, the coding unit division method indicated by the information indicating the division shape mode may be determined based on the block shape indicated by the block shape information used by the image decoding apparatus 100.

[0190] The image decoding device 100 may obtain information about the division shape mode from the bitstream. However, the image decoding device 100 and the image encoding device 150 may obtain information about the predetermined division shape mode based on the block shape information. The image decoding device 100 may obtain information about the predetermined division shape mode for the maximum coding unit or the minimum coding unit. For example, the image decoding device 100 may determine the information about the division shape mode for the maximum coding unit as four divisions. In addition, the image decoding device 100 may determine the information about the division shape mode for the minimum coding unit as "no division". More specifically, the image decoding device 100 may determine the size of the maximum coding unit to be 256×256. The image decoding device 100 may determine the information about the predetermined division shape mode to be four divisions. The four divisions may be a division shape mode that divides both the width and height of the coding unit into two equal parts. The image decoding device 100 may obtain a coding unit of a size of 128×128 from a maximum coding unit of a size of 256×256 based on the information about the division shape mode. In addition, the image decoding device 100 may determine the size of the minimum coding unit to be 4×4. The image decoding apparatus 100 may obtain information about a division shape mode indicating “no division” with respect to a minimum coding unit.

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

[0192] Reference Figure 5According to an embodiment, the image decoding apparatus 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the information about the division shape pattern indicating that the division is performed in the vertical direction. The image decoding apparatus 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the information about the division shape pattern indicating that the division is performed in the horizontal direction. The image decoding apparatus 100 may determine four coding units 310d obtained by dividing the coding unit 300 in the vertical direction and the horizontal direction based on the information about the division shape pattern indicating that the division is performed in the vertical direction and the horizontal direction. However, the division method of the square coding unit is not limited to the above method, and the information about the division shape pattern may indicate various methods. The predetermined division method for dividing the square coding unit will be described in detail below in conjunction with various embodiments.

[0193] Figure 6 A process of determining at least one coding unit by splitting a non-square coding unit, performed by the image decoding apparatus 100 according to an embodiment, is illustrated.

[0194] According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding apparatus 100 may determine whether to not split the non-square current coding unit or to split the non-square current coding unit by using a predetermined splitting method based on information about the splitting shape mode. Figure 6 , when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding apparatus 100 may determine that the coding unit 410 or 460 having the same size as the current coding unit 400 or 450 is not split based on the information about the split shape mode indicating that splitting is not performed, or may determine that the coding units 420a and 420b, the coding units 430a to 430c, the coding units 470a and 470b, or the coding units 480a to 480c are split based on the information about the split shape mode indicating a predetermined splitting method. The predetermined splitting method for splitting the non-square coding unit will be described in detail below in conjunction with various embodiments.

[0195] According to an embodiment, the image decoding apparatus 100 may determine a splitting method of a coding unit by using information about a splitting shape pattern, and in this case, the information about the splitting shape pattern may indicate the number of one or more coding units generated by splitting the coding unit. Figure 6, when the information about the division shape pattern indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 can determine the two coding units 420a and 420b or the coding units 470a and 470b included in the current coding unit 400 or 450 by dividing the current coding unit 400 or 450 based on the information about the division shape pattern.

[0196] According to an embodiment, when the image decoding apparatus 100 splits the non-square current coding unit 400 or 450 based on the information about the split shape pattern, the image decoding apparatus 100 may split the current coding unit in consideration of the position of the long side of the non-square current coding unit 400 or 450. For example, the image decoding apparatus 100 may determine a plurality of coding units by splitting the long side of the current coding unit 400 or 450 in consideration of the shape of the current coding unit 400 or 450.

[0197] According to an embodiment, when the information about the division shape mode indicates that the coding unit is divided into an odd number of blocks (three divisions), the image decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 400 or 450. For example, when the information about the division shape mode indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding apparatus 100 may divide the current coding unit 400 or 450 into three coding units 430a, 430b, 430c, 480a, 480b, and 480c.

[0198] According to an embodiment, the ratio of the width and height of the current coding unit 400 or 450 may be 4:1 or 1:4. When the ratio of the width and the height is 4:1, because 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 ratio of the width and the height is 1:4, because 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 that the current coding unit is divided into an odd number of blocks based on information about the division shape mode. In addition, the image decoding device 100 may determine the division direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is in the vertical direction, the image decoding device 100 may divide the current coding unit 400 in the horizontal direction to determine the coding units 430a, 430b, and 430c. Also, when the current coding unit 450 is in a horizontal direction, the image decoding apparatus 100 may split the current coding unit 450 in a vertical direction to determine coding units 480a, 480b, and 480c.

[0199] According to an embodiment, the image decoding apparatus 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 coding units 480a, 480b, and 480c may have a size different from that of other coding units 430a and 430c or coding units 480a and 480c. That is, the coding unit determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, all of the odd number of coding units 430a, 430b, and 430c or coding units 480a, 480b, and 480c may have different sizes.

[0200] According to an embodiment, when the information about the division shape mode indicates that the coding unit is divided into an odd number of blocks, the image decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 400 or 450, and further, may apply a predetermined restriction to at least one coding unit among the odd number of coding units generated by dividing the current coding unit 400 or 450. Figure 6 , the image decoding apparatus 100 may set the decoding process of the coding unit 430b or 480b located at the center among the three coding units 430a, 430b, and 430c or the coding units 480a, 480b, and 480c generated when the current coding unit 400 or 450 is divided to be different from the decoding process of the other coding units 430a and 430c or the coding units 480a and 480c. For example, unlike the other coding units 430a and 430c or the coding units 480a and 480c, the image decoding apparatus 100 may limit the coding unit 430b or 480b at the center position to not be divided again or to be divided only a predetermined number of times.

[0201] Figure 7 A process of splitting a coding unit based on at least one piece of information among block shape information and information about a division shape mode, performed by the image decoding apparatus 100 according to an embodiment is illustrated.

[0202] 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 to divide into coding units based on at least one of the block shape information and the information about the division shape mode. According to an embodiment, when the information about the division shape mode indicates that the first coding unit 500 is divided 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 the coding unit is divided. 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.

[0203] According to an embodiment, the image decoding apparatus 100 may determine whether to split the determined second coding unit 510 into coding units or not to split into coding units based on at least one of the block shape information and the information about the division shape mode. Figure 7, the image decoding apparatus 100 may split the non-square second coding unit 510 determined by splitting the first coding unit 500 into one or more third coding units 520a or third coding units 520b, 520c, and 520d based on at least one of the block shape information and the information about the split shape mode, or may not split the non-square second coding unit 510 into one or more third coding units 520a or third coding units 520b, 520c, and 520d. The image decoding apparatus 100 may obtain at least one of the block shape information and the information about the split shape mode, and determine a plurality of second coding units (for example, 510) of various shapes by splitting the first coding unit 500 based on the obtained block shape information and at least one of the information about the split shape mode, and may split the second coding unit 510 by using the split method of the first coding unit 500 based on the block shape information and at least one of the information about the split shape mode. According to an embodiment, when the first coding unit 500 is divided into the second coding unit 510 based on the block shape information of the first coding unit 500 and at least one piece of information about the division shape mode, the second coding unit 510 may also be divided into the third coding unit 520a or the third coding units 520b, 520c, and 520d based on the block shape information of the second coding unit 510 and at least one piece of information about the division shape mode. That is, the coding unit may be recursively divided based on the block shape information of each coding unit and at least one piece of information about the division shape mode. 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.

[0204] Reference Figure 7 , a predetermined coding unit (e.g., a coding unit at a center position or a square coding unit) among the odd-numbered third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510 may be recursively divided. According to an embodiment, a square third coding unit 520c among the odd-numbered third coding units 520b, 520c, and 520d may be divided into a plurality of fourth coding units in the horizontal direction. A non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d may be divided again into a plurality of coding units. For example, a non-square fourth coding unit 530b or 530d may be divided again into an odd-numbered coding unit. A method that may be used to recursively divide a coding unit will be described later through various embodiments.

[0205] According to an embodiment, the image decoding apparatus 100 may divide each of the third coding units 520a, 520b, 520c, and 520d into coding units based on at least one of the block shape information and the information about the division shape mode. In addition, the image decoding apparatus 100 may determine not to divide the second coding unit 510 based on the block shape information and at least one of the information about the division shape mode. According to an embodiment, the image decoding apparatus 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding apparatus 100 may 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 apparatus 100 may limit the third coding unit 520c located at the center position among the odd number of third coding units 520b, 520c, and 520d to no longer be divided or to be divided a set number of times.

[0206] Reference Figure 7 , the image decoding device 100 may limit the third coding unit 520c located at the center position among the odd third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to no longer be divided, or to be divided by using a predetermined division method (for example, only divided into four coding units or divided by using the division method of the second coding unit 510), or to be divided only a predetermined number of times (for example, only divided n times (where n>0)). However, the limitation on the third coding unit 520c at the center position is not limited to the above example, and unlike the other third coding units 520b and 520d, the limitation on the third coding unit 520c at the center position may include various limitations for decoding the third coding unit 520c at the center position.

[0207] According to an embodiment, the image decoding apparatus 100 may obtain at least one piece of information of block shape information for splitting the current coding unit and information about a split shape mode from a predetermined position in the current coding unit.

[0208] Figure 8 A method of determining a predetermined coding unit among odd-numbered coding units, performed by the image decoding apparatus 100 according to an embodiment, is illustrated.

[0209] Reference Figure 8, at least one of the block shape information and the information on the division shape mode of the current coding unit 600 or 650 may be obtained from a sample at a predetermined position among a plurality of samples included in the current coding unit 600 or 650 (e.g., a sample 640 or 690 at a 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 division shape mode may be obtained is not limited to Figure 8 , and may include various positions (e.g., above, below, left, right, upper left, lower left, upper right, and lower right positions) included in the current coding unit 600. The image decoding apparatus 100 may obtain at least one of the block shape information and the information about the division shape mode from the predetermined position, and determine whether to divide or not divide the current coding unit into coding units of various shapes and sizes.

[0210] According to an embodiment, when the current coding unit is divided into a predetermined number of coding units, the image decoding apparatus 100 may select one of the coding units. As will be described below in conjunction with various embodiments, various methods may be used to select one of a plurality of coding units.

[0211] According to an embodiment, the image decoding apparatus 100 may split a current coding unit into a plurality of coding units, and may determine a coding unit at a predetermined position.

[0212] According to an embodiment, the image decoding apparatus 100 may determine a coding unit located at the center of the odd-numbered coding units using information indicating the position of each of the odd-numbered coding units. Figure 8 , the image decoding apparatus 100 may divide the current coding unit 600 or the current coding unit 650 to determine the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. The image decoding apparatus 100 may determine the center coding unit 620b or the center coding unit 660b by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. For example, the image decoding apparatus 100 may determine the coding unit 620b at the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of predetermined samples included in the coding units 620a, 620b, and 620c. In detail, the image decoding apparatus 100 may determine the coding unit 620b at the center position by determining the positions of the coding units 620a, 620b, and 620c based on information representing the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c.

[0213] According to an embodiment, the information indicating the positions of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include 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 sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include 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 apparatus 100 may determine the coding unit 620b at the center 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 of the coding unit corresponding to the difference between the coordinates.

[0214] According to an embodiment, information indicating the position of the upper left sample point 630a of the upper coding unit 620a may include coordinates (xa, ya), information indicating the position of the upper left sample point 630b of the center coding unit 620b may include coordinates (xb, yb), and information indicating the position of the upper left sample point 630c of the lower coding unit 620c may include coordinates (xc, yc). The image decoding apparatus 100 may determine the center coding unit 620b by using the coordinates of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c. For example, when the coordinates of the upper left sample points 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the sample point 630b at the center position may be determined as the coding unit located at the center position among 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 sample points 630a, 630b, and 630c may include coordinates indicating absolute positions in the screen, or coordinates (dxb, dyb) indicating the relative position of the upper left sample point 630b of the center coding unit 620b relative to the position of the upper left sample point 630a of the upper coding unit 620a and coordinates (dxc, dyc) indicating the relative position of the upper left sample point 630c of the lower coding unit 620c relative to the position of the upper left sample point 630a of the upper coding unit 620a may be used. The method of determining the coding unit at a predetermined position by using the coordinates of the sample points included in the coding unit as information indicating the positions of the sample points is not limited to the above method, and may include various arithmetic methods capable of using the coordinates of the sample points.

[0215] According to an embodiment, the image decoding apparatus 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 apparatus 100 may select a coding unit 620b having a size different from that of other coding units from among the coding units 620a, 620b, and 620c.

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

[0217] The image decoding apparatus 100 may determine the width or height of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd) as information representing the position of the upper left sample point 670a of the left coding unit 660a, the coordinates (xe, ye) as information representing the position of the upper left sample point 670b of the center coding unit 660b, and the coordinates (xf, yf) as information representing the position of the upper left sample point 670c of the right coding unit 660c. The image decoding apparatus 100 may determine the size of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd), (xe, ye), and (xf, yf) representing the positions of the coding units 660a, 660b, and 660c.

[0218] According to an embodiment, the image decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 may 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 may determine the width of the center coding unit 660b as xf-xe. The image decoding device 100 may determine the height of the center coding unit 660b as the height of the current coding unit 600. According to an embodiment, the image decoding device 100 may determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the center coding unit 660b. The image decoding device 100 may determine a coding unit having a size different from that of other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. Referring to Figure 8 , the image decoding apparatus 100 may determine the center 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 the predetermined position. However, the process of determining the coding unit having a size different from the sizes of other coding units in the image decoding apparatus 100 is an embodiment of determining the coding unit at the predetermined position by using the size of the coding unit determined based on the sample point coordinates. Therefore, various processes of determining the coding unit at the predetermined position by comparing the size of the coding unit determined according to the predetermined sample point coordinates may be used.

[0219] However, the position of the sample considered to determine the position of the coding unit is not limited to the above-mentioned upper left position, and information on arbitrary positions of samples included in the coding unit may be used.

[0220] According to an embodiment, the image decoding apparatus 100 may select a coding unit at a predetermined position from an odd number of coding units determined by dividing the current coding unit in consideration of the shape of the current coding unit. For example, when the current coding unit has a non-square shape in which the width is longer than the height, the image decoding apparatus 100 may determine a coding unit at a predetermined position in the horizontal direction. That is, the image decoding apparatus 100 may determine one of the coding units at different positions in the horizontal direction and impose restrictions on the coding unit. When the current coding unit has a non-square shape in which the height is longer than the width, the image decoding apparatus 100 may determine a coding unit at a predetermined position in the vertical direction. That is, the image decoding apparatus 100 may determine one of the coding units at different positions in the vertical direction and may impose restrictions on the coding unit.

[0221] According to an embodiment, the image decoding apparatus 100 may use information indicating respective positions of even-numbered coding units to determine a coding unit at a predetermined position from among the even-numbered coding units. The image decoding apparatus 100 may determine the even-numbered coding units by dividing (dividing) the current coding unit and determine the coding unit at the predetermined position by using information about the positions of the even-numbered coding units. The operations related thereto may be combined with the above. Figure 8 The operation of determining a coding unit at a predetermined position (eg, a center position) from among an odd number of coding units is described in detail, and thus a detailed description thereof is not provided here.

[0222] According to an embodiment, when a non-square current coding unit is split into a plurality of coding units, predetermined information about the coding unit at a predetermined position may be used in a split operation to determine the coding unit at the predetermined position from among the plurality of coding units. For example, the image decoding apparatus 100 may use at least one piece of information of block shape information stored in a sample included in a center coding unit and information about a split shape mode to determine the coding unit at the center position from among the plurality of coding units determined by splitting the current coding unit in a split operation.

[0223] Reference Figure 8, the image decoding apparatus 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on at least one of the block shape information and the information on the division shape mode, and may determine the coding unit 620b at the center position from the plurality of coding units 620a, 620b, and 620c. In addition, the image decoding apparatus 100 may determine the coding unit 620b at the center position in consideration of the position at which at least one of the block shape information and the information on the division shape mode is obtained. That is, the block shape information of the current coding unit 600 and at least one of the information on the division shape mode may be obtained from a sample 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the block shape information and at least one of the information on the division shape mode, the coding unit 620b including the sample 640 may be determined as the coding unit at the center position. However, information used to determine the coding unit at the center position is not limited to at least one of the block shape information and the information about the division shape mode, and various types of information may be used to determine the coding unit at the center position.

[0224] According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from predetermined samples included in a coding unit to be determined. Figure 8 , the image decoding apparatus 100 may use block shape information obtained from a sample at a predetermined position in the current coding unit 600 (for example, a sample at a center position of the current coding unit 600) and at least one piece of information about the division shape mode to determine a coding unit at a predetermined position (for example, a coding unit at a center position of the plurality of divided coding units) from a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. That is, the image decoding apparatus 100 may determine the sample at the predetermined position by considering the block shape of the current coding unit 600, determine the coding unit 620b including the sample for which the predetermined information (for example, at least one piece of information about the block shape information and the information about the division shape mode) from a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may impose a predetermined restriction on the coding unit 620b. Referring to Figure 8 According to an embodiment, the image decoding apparatus 100 may determine a sample 640 at a center position of a current coding unit 600 as a sample from which predetermined information may be obtained in a decoding operation, and may impose a predetermined restriction on a coding unit 620b including the sample 640. However, the position of the sample from which the predetermined information may be obtained is not limited to the above-mentioned position, and may include any position of the sample included in the coding unit 620b to be determined for restriction.

[0225] According to an embodiment, the position of the sample at which the 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 or non-square shape, and the position of the sample at which the predetermined information can be obtained may be determined based on the shape. For example, the image decoding apparatus 100 may determine a sample located on a boundary for dividing at least one of the width and the height of the current coding unit in half as a sample at which the predetermined information can be obtained by using at least one of the information about the width of the current coding unit and the information about the height of the current coding unit. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding apparatus 100 may determine one of the samples adjacent to the boundary for dividing the long side of the current coding unit in half as a sample at which the predetermined information can be obtained.

[0226] According to an embodiment, when a current coding unit is divided into a plurality of coding units, the image decoding device 100 may use block shape information and at least one piece of information about a division shape mode to determine a coding unit at a predetermined position from the plurality of coding units. According to an embodiment, the image decoding device 100 may obtain block shape information and at least one piece of information about a division shape mode from a sample at a predetermined position in the coding unit, and divide the plurality of coding units by using block shape information obtained from a sample at a predetermined position in each of a plurality of coding units generated by dividing the current coding unit and at least one piece of information about a division shape mode. That is, the coding unit may be recursively divided based on block shape information obtained from a sample at a predetermined position in each coding unit and at least one piece of information about a division shape mode. The above has been combined with Figure 7 The operation of recursively dividing the coding unit is described, so its detailed description will not be provided here.

[0227] According to an embodiment, the image decoding apparatus 100 may determine one or more coding units by splitting a current coding unit, and may determine an order in which to decode the one or more coding units based on a predetermined block (for example, the current coding unit).

[0228] Fig. 9 An order in which a plurality of coding units are processed when the image decoding apparatus 100 determines a plurality of coding units by splitting a current coding unit according to an embodiment is illustrated.

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

[0230] Reference Fig. 9 , the image decoding apparatus 100 may determine to process the second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction in a horizontal direction order 710c. The image decoding apparatus 100 may determine to process the second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction in a vertical direction order 730c. The image decoding apparatus 100 may determine to process the second coding units 750a to 750d determined by dividing the first coding unit 700 in the vertical and horizontal directions in a predetermined order (for example, in a raster scan order or a zigzag scan order 750e) for processing coding units in one row and then processing coding units in the next row.

[0231] According to an embodiment, the image decoding apparatus 100 may recursively divide the coding unit. Fig. 9 , the image decoding apparatus 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. A division method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may correspond to a division method of the first coding unit 700. Therefore, 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 to Fig. 9 , the image decoding apparatus 100 may determine the second coding units 710a and 710b by dividing the first coding unit 700 in a vertical direction, and may determine to divide each of the second coding units 710a and 710b independently or not to divide each of the second coding units 710a and 710b.

[0232] According to an embodiment, the image decoding apparatus 100 may determine the third coding units 720a and 720b by splitting the second coding unit 710a on the left side in a horizontal direction, and may not split the second coding unit 710b on the right side.

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

[0234] Fig.10 A process of determining that a current coding unit is to be split into an odd number of coding units when coding units cannot be processed in a predetermined order, performed by the image decoding apparatus 100 according to an embodiment is illustrated.

[0235] According to an embodiment, the image decoding apparatus 100 may determine whether the current coding unit is split into an odd number of coding units based on the obtained block shape information and the information about the division shape mode. Fig.10 , 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 third coding units 820c to 820e. According to an embodiment, the image decoding apparatus 100 may determine a plurality of third coding units 820a and 820b by dividing the second coding unit 810a on the left side in the horizontal direction, and may divide the second coding unit 810b on the right side into an odd number of third coding units 820c to 820e.

[0236] According to an embodiment, the image decoding apparatus 100 may determine whether any coding unit is split into an odd number of coding units by determining whether the third coding units 820a and 820b and the third coding units 820c to 820e can be processed in a predetermined order. Fig.10 , the image decoding apparatus 100 may determine the third coding units 820a and 820b and the third coding units 820c to 820e by recursively dividing the first coding unit 800. The image decoding apparatus 100 may determine whether any one of the first coding unit 800, the second coding units 810a and 810b, the third coding units 820a and 820b, and the third coding units 820c to 820e is divided into an odd number of coding units based on at least one of the block shape information and the information about the division shape mode. For example, the second coding unit 810b on the right side of the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the multiple coding units included in the first coding unit 800 can be a predetermined order (for example, a Z-shaped scanning order 830), and the image decoding device 100 can determine whether the third coding units 820c, 820d and 820e determined by dividing the second coding unit 810b on the right into an odd number of coding units meet the conditions for processing in a predetermined order.

[0237] According to an embodiment, the image decoding apparatus 100 may determine whether the third coding units 820a and 820b and the third coding units 820c to 820e included in the first coding unit 800 satisfy a condition for processing in a 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 in half along the boundary of the third coding units 820a and 820b and the third coding units 820c to 820e. For example, the third coding units 820a and 820b determined when the height of the second coding unit 810a on the left side of the non-square shape is divided in half may satisfy the condition. Because the boundary of the third coding units 820c to 820e determined when the second coding unit 810b on the right side is divided into three coding units cannot divide the width or height of the second coding unit 810b on the right side in half, it may 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 apparatus 100 may determine that the scanning order is broken, and may determine that the second coding unit 810b on the right is divided into an odd number of coding units based on the result of the determination. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may impose a predetermined restriction on the coding unit at a predetermined position in the divided coding unit. The restriction or predetermined position has been described above in conjunction with various embodiments, so a detailed description thereof will not be provided here.

[0238] Fig.11 A process of determining at least one coding unit by splitting the first coding unit 900 , performed by the image decoding apparatus 100 according to an embodiment, is illustrated.

[0239] According to an embodiment, the image decoding apparatus 100 may divide the first coding unit 900 based on at least one of the block shape information obtained by the obtainer (not shown) and the information about the division shape mode. The square first coding unit 900 may be divided into four square coding units, or may be divided into a plurality of non-square coding units. For example, referring to Fig.11 , when the block shape information indicates that the first coding unit 900 has a square shape and the information about the division shape mode indicates that the first coding unit 900 is divided into non-square coding units, the image decoding apparatus 100 may divide the first coding unit 900 into a plurality of non-square coding units. In detail, when the information about the division shape mode indicates that an odd number of coding units is determined by dividing the first coding unit 900 in a horizontal direction or a vertical direction, the image decoding apparatus 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 in a vertical direction or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in a horizontal direction).

[0240] According to an embodiment, the image decoding apparatus 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 processing in a predetermined order, and the condition is related to whether at least one of the width and height of the first coding unit 900 is divided in half along the boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Fig.11, because the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in the vertical direction do not divide the width of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not meet the condition for processing in a predetermined order. In addition, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction do not divide the height of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not meet the condition for processing in a predetermined order. When the condition is not satisfied as described above, the image decoding apparatus 100 may determine that the scanning order is broken, and may determine that the first coding unit 900 is divided into an odd number of coding units based on the result of the determination. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may impose a predetermined restriction on the coding unit at a predetermined position in the divided coding unit. The restriction or the predetermined position has been described above in conjunction with various embodiments, so a detailed description thereof will not be provided here.

[0241] According to an embodiment, the image decoding apparatus 100 may determine coding units of various shapes by splitting the first coding unit.

[0242] Reference Fig.11 , the image decoding apparatus 100 may divide the square first coding unit 900 or the non-square first coding unit 930 or 950 into coding units of various shapes.

[0243] Fig.12 It is shown that shapes into which the second coding unit may be divided are restricted when a second coding unit having a non-square shape determined as the image decoding apparatus 100 splits the first coding unit 1000 satisfies a predetermined condition according to an embodiment.

[0244] According to an embodiment, the image decoding apparatus 100 may determine whether to divide the square first coding unit 1000 into non-square second coding units 1010a and 1010b or second coding units 1020a and 1020b based on at least one of the block shape information obtained by the obtainer (not shown) and the information about the division shape mode. The second coding units 1010a and 1010b or the second coding units 1020a and 1020b may be independently divided. Like this, the image decoding apparatus 100 may determine whether to divide the second coding units 1010a and 1010b or each of the second coding units 1020a and 1020b into a plurality of coding units based on at least one of the block shape information of each of the second coding units 1010a and 1010b or the second coding units 1020a and 1020b and the information about the division shape mode. According to an embodiment, the image decoding apparatus 100 may determine the third coding units 1012a and 1012b by splitting the second coding unit 1010a on the left side of the non-square determined by splitting the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the second coding unit 1010a on the left side is split in the horizontal direction, the image decoding apparatus 100 may limit the second coding unit 1010b on the right side to not be split in the horizontal direction in which the second coding unit 1010a on the left side is split. When the third coding units 1014a and 1014b are determined by splitting the second coding unit 1010b on the right side in the same direction, since the second coding unit 1010a on the left side and the second coding unit 1010b on the right side are independently split in the horizontal direction, the third coding units 1012a and 1012b or the third coding units 1014a and 1014b may be determined. However, this case is equivalent to a 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 block shape information and at least one piece of information about the division shape pattern, and may be inefficient in terms of image decoding.

[0245] According to an embodiment, the image decoding apparatus 100 may determine the third coding units 1022a and 1022b or the third coding units 1024a and 1024b by vertically splitting the non-square second coding unit 1020a or 1020b determined by splitting the first coding unit 1000 in the horizontal direction. However, when the second coding unit (e.g., the upper second coding unit 1020a) is split in the vertical direction, for the above-mentioned reason, the image decoding apparatus 100 may limit another second coding unit (e.g., the lower second coding unit 1020b) to not be split in the vertical direction in which the upper second coding unit 1020a is split.

[0246] Fig.13 A process of splitting a square coding unit when information about a division shape pattern may not indicate that the square coding unit is split into four square coding units, performed by the image decoding apparatus 100 according to an embodiment, is illustrated.

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

[0248] According to an embodiment, the image decoding apparatus 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 a method of dividing the first coding unit 1100 based on at least one of block shape information and information about a division shape mode.

[0249] For example, the image decoding apparatus 100 may determine square third coding units 1112a and 1112b by dividing the second coding unit 1110a on the left side in the horizontal direction, and may determine square third coding units 1114a and 1114b by dividing the second coding unit 1110b on the right side in the horizontal direction. In addition, the image decoding apparatus 100 may determine square third coding units 1116a, 1116b, 1116c, and 1116d by dividing both the second coding unit 1110a on the left side and the second coding unit 1110b on the right side in the horizontal direction. In this case, a coding unit 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.

[0250] As another example, the image decoding apparatus 100 may determine the third coding units 1122a and 1122b of the square shape by dividing the second coding unit 1120a above in the vertical direction, and may determine the third coding units 1124a and 1124b of the square shape by dividing the second coding unit 1120b below in the vertical direction. In addition, the image decoding apparatus 100 may determine the third coding units 1126a, 1126b, 1126c, and 1126d of the square shape by dividing both the second coding unit 1120a above and the second coding unit 1120b below in the vertical direction. In this case, a coding unit 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.

[0251] Fig.14 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of dividing the coding units.

[0252] According to an embodiment, the image decoding apparatus 100 may divide the first coding unit 1200 based on the block shape information and the information about the division shape mode. When the block shape information indicates a square shape and the information about the division shape mode indicates that the first coding unit 1200 is divided in at least one of the horizontal direction and the vertical direction, the image decoding apparatus 100 may determine the second coding units 1210a and 1210b or the second coding units 1220a and 1220b, etc. by dividing the first coding unit 1200. Fig.14 , the non-square second coding units 1210a and 1210b or the second coding units 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 about the division shape pattern. For example, the image decoding device 100 may determine the 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 the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction. The above has been combined with Fig.13 An operation of dividing the second coding units 1210a and 1210b or the second coding units 1220a and 1220b is described, and thus a detailed description thereof will not be provided here.

[0253] According to an embodiment, the image decoding apparatus 100 may process coding units in a predetermined order.

[0254] The above has been combined Fig. 9 The operation of processing the encoding units in a predetermined order is described, and thus a detailed description thereof will not be provided here. Fig.14 , the image decoding apparatus 100 may determine four square third coding units 1216a, 1216b, 1216c, and 1216d and third coding units 1226a, 1226b, 1226c, and 1226d by dividing the square first coding unit 1200. According to an embodiment, the image decoding apparatus 100 may determine the processing order of the third coding units 1216a, 1216b, 1216c, and 1216d and the third coding units 1226a, 1226b, 1226c, and 1226d based on the division method of the first coding unit 1200.

[0255] According to an embodiment, the image decoding device 100 can determine the 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 can process the third coding units 1216a, 1216b, 1216c and 1216d in a processing order 1217, wherein the processing order 1217 is used to first process the third coding units 1216a and 1216c included in the second coding unit 1210a on the left side in the vertical direction and then process the third coding units 1216b and 1216c included in the second coding unit 1210b on the right side in the vertical direction.

[0256] According to an embodiment, the image decoding device 100 can determine the third coding units 1226a, 1226b, 1226c and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction, and can process the third coding units 1226a, 1226b, 1226c and 1226d in a processing order 1227, wherein the processing order 1227 is used to first process the third coding units 1226a and 1226b included in the second coding unit 1220a above in the horizontal direction and then process the third coding units 1226c and 1226d included in the second coding unit 1220b below in the horizontal direction.

[0257] Reference Fig.14, square third coding units 1216a, 1216b, 1216c and 1216d and third coding units 1226a, 1226b, 1226c and 1226d can be determined by dividing the second coding units 1210a and 1210b and the second coding units 1220a and 1920b respectively. Although the second coding units 1210a and 1210b are determined by splitting the first coding unit 1200 in a vertical direction differently from determining the second coding units 1220a and 1220b by splitting the first coding unit 1200 in a horizontal direction, the third coding units 1216a, 1216b, 1216c, and 1216d and the third coding units 1226a, 1226b, 1226c, and 1226d split from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b ultimately show the same shape of coding units split from the first coding unit 1200. Like this, by recursively splitting the coding units in different manners based on at least one piece of information of the block shape information and the information about the split shape mode, even when the coding units are ultimately determined to be the same shape, the image decoding apparatus 100 may process a plurality of coding units in different orders.

[0258] Fig.15 A process of determining a depth of a coding unit as a shape and a size of a coding unit change when a coding unit is recursively split so that a plurality of coding units are determined according to an embodiment is illustrated.

[0259] According to an embodiment, the image decoding device 100 may determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion may 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 divided current coding unit, the image decoding device 100 may determine that the depth of the current coding unit is increased by n from the depth of the coding unit before being divided. In the following description, a coding unit with an increased depth is expressed as a coding unit of a deeper depth.

[0260] Reference Fig.15According to an embodiment, the image decoding apparatus 100 may determine a second coding unit 1302 and a third coding unit 1304 of a deeper depth by dividing the square first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may be expressed as "0: SQUARE"). Assuming that the size of the square first coding unit 1300 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 of 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 may be D+1, and the depth of the third coding unit 1304 may be D+2, wherein the width and height of the second coding unit 1302 are 1 / 2 of the width and height of the first coding unit 1300, and the width and height of the third coding unit 1304 are 1 / 4 of the width and height of the first coding unit 1300.

[0261] According to an embodiment, the image decoding device 100 can determine the second coding unit 1312 or 1322 and the third coding unit 1314 or 1324 of a deeper depth by splitting the non-square first coding unit 1310 or 1320 based on block shape information representing a non-square shape (for example, the block shape information can be expressed as "1: NS_VER" indicating a non-square whose height is longer than its width, or as "2: NS_HOR" indicating a non-square whose width is longer than its height).

[0262] The image decoding apparatus 100 may determine the second coding unit 1302, 1312, or 1322 by splitting at least one of the width and the height of the first coding unit 1310 having a size of N×2N. That is, the image decoding apparatus 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1322 having a size of N×N / 2 by splitting the first coding unit 1310 in a horizontal direction, or may determine the second coding unit 1312 having a size of N / 2×N by splitting the first coding unit 1310 in horizontal and vertical directions.

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

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

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

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

[0267] According to an embodiment, the image decoding apparatus 100 may split the square coding unit 1300, 1302, or 1304 in a horizontal direction or a vertical direction. For example, the image decoding apparatus 100 may determine a first coding unit 1310 having a size of N×2N by splitting the 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 splitting the first coding unit 1300 in a horizontal direction. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by splitting 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.

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

[0269] Fig.16 Depth that may be determined based on a shape and a size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.

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

[0271] According to an embodiment, the depth of the second coding units 1402a and 1402b, the second coding units 1404a and 1404b, and the second coding units 1406a, 1406b, 1406c, and 1406d determined based on the information about the division shape mode of the square first coding unit 1400 may be determined based on the length of the long side of the second coding units 1402a and 1402b, the second coding units 1404a and 1404b, and the second coding units 1406a, 1406b, 1406c, and 1406d. For example, since the length of the side of the square first coding unit 1400 is equal to the length of the long side of the non-square second coding units 1402a and 1402b and the second coding units 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and the second coding units 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 division shape pattern, because the length of the side of the square second coding units 1406a, 1406b, 1406c and 1406d is 1 / 2 of the length of the side of the first coding unit 1400, the depth of the second coding units 1406a, 1406b, 1406c and 1406d can be D+1, which is deeper than the depth D of the first coding unit 1400 by 1.

[0272] According to an embodiment, the image decoding apparatus 100 may determine a plurality of second coding units 1412a and 1412b and second coding units 1414a, 1414b, and 1414c by splitting the first coding unit 1410 whose height is longer than its width in a horizontal direction based on information about the split shape pattern. According to an embodiment, the image decoding apparatus 100 may determine a plurality of second coding units 1422a and 1422b and second coding units 1424a, 1424b, and 1424c by splitting the first coding unit 1420 whose width is longer than its height in a vertical direction based on information about the split shape pattern.

[0273] According to an embodiment, the depth of the second coding units 1412a and 1412b and the second coding units 1414a, 1414b and 1414c or the second coding units 1422a and 1422b and the second coding units 1424a, 1424b and 1424c, which are determined based on the information about the division shape pattern of the non-square first coding unit 1410 or 1420, can be determined based on the length of the long sides of the second coding units 1412a and 1412b and the second coding units 1414a, 1414b and 1414c or the second coding units 1422a and 1422b and the second coding units 1424a, 1424b and 1424c. For example, because the length of the side of the square second coding units 1412a and 1412b is 1 / 2 of the length of the long side of the first coding unit 1410 having a non-square shape in which the height is longer than the width, the depth of the square second coding units 1412a and 1412b is D+1, which is deeper than the depth D of the non-square first coding unit 1410 by 1.

[0274] In addition, the image decoding apparatus 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 division shape mode. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are 1 / 2 of 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 which is deeper than the depth D of the non-square first coding unit 1410 by 1. The image decoding apparatus 100 may determine the depths of the coding units split from the first coding unit 1420 having the non-square shape having a width longer than a height by using the above-described method of determining the depths of the coding units split from the first coding unit 1410 .

[0275] According to an embodiment, when the odd-numbered split coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for identifying the split coding units based on a size ratio between the coding units. Fig.16, the coding unit 1414b at the center position among the odd-numbered divided coding units 1414a, 1414b, and 1414c may have a width equal to that of the other coding units 1414a and 1414c and a height twice the height of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the center position may include two other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the center position is 1 based on the scanning order, the PID of the coding unit 1414c located next to the coding unit 1414b may be increased by 2 and may be 3. That is, there may be discontinuity in the PID value. According to an embodiment, the image decoding device 100 may determine whether the odd-numbered divided coding units do not have equal sizes based on whether there is discontinuity in the PID used to identify the divided coding units.

[0276] According to an embodiment, the image decoding apparatus 100 may determine whether to use a specific splitting method based on a PID value for identifying a plurality of coding units determined by splitting a current coding unit. Fig.16 , the image decoding apparatus 100 may determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b, and 1414c by dividing the first coding unit 1410 having a rectangular shape having a height longer than a width. The image decoding apparatus 100 may use the PID to identify each coding unit. According to an embodiment, the PID may be obtained from a sample point at a predetermined position of each coding unit (e.g., an upper left sample point).

[0277] According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a predetermined position from the divided coding units by using a PID for distinguishing the coding units. According to an embodiment, when the information about the division shape mode of the first coding unit 1410 having a rectangular shape having a height longer than a width indicates that the coding unit is divided into three coding units, the image decoding apparatus 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding apparatus 100 may assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding apparatus 100 may compare the PIDs of the odd-numbered divided coding units to determine a coding unit at a center position from a plurality of coding units. The image decoding apparatus 100 may determine the coding unit 1414b having a PID corresponding to a center value among the PIDs of the plurality of coding units as a coding unit at a center position among the plurality of 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 apparatus 100 may determine a PID for distinguishing the divided coding units based on a size ratio between the coding units. Fig.16 , the coding unit 1414b generated by dividing the first coding unit 1410 may have a width equal to that of the other coding units 1414a and 1414c and a height twice the height 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 next to the coding unit 1414b may be increased by 2 and may be 3. When the PID as described above is not uniformly increased, the image decoding apparatus 100 may determine that the coding unit is divided into a plurality of coding units including coding units having sizes different from those 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 apparatus 100 may divide the current coding unit in such a manner 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 that of the other coding units. In this case, the image decoding apparatus 100 may determine the coding units at the center position having different sizes by using the PIDs of the coding units. However, the size or position of the coding unit at the predetermined position and the PID are not limited to the above-mentioned examples, and various positions and various sizes of the coding unit and various PIDs may be used.

[0278] According to an embodiment, the image decoding apparatus 100 may use a predetermined data unit that is recursively divided starting from a coding unit.

[0279] Fig.17It is shown that a plurality of coding units according to an embodiment are determined based on a plurality of predetermined data units included in a picture.

[0280] According to an embodiment, a predetermined data unit may be defined as a data unit from which a coding unit is recursively divided 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 a coding unit for determining a highest depth of a plurality of coding units divided from a current picture. In the following description, for ease of explanation, a predetermined data unit is referred to as a reference data unit.

[0281] 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 multiple 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.

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

[0283] According to an embodiment, the image decoding apparatus 100 may predetermine a minimum size of a reference data unit allowed to be included in the current picture. Therefore, the image decoding apparatus 100 may determine various reference data units having a size equal to or larger than the minimum size, and may determine one or more coding units by using block shape information and information about a division shape mode with reference to the determined reference data unit.

[0284] Reference Fig.17 , the image decoding apparatus 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., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.) that can include one or more reference coding units.

[0285] According to an embodiment, an obtainer (not shown) of the image decoding apparatus 100 may obtain at least one of reference coding unit shape information and reference coding unit size information for each of various data units from a bitstream. Figure 5The operation of dividing the current coding unit 300 describes the operation of dividing the square reference coding unit 1500 into one or more coding units, and the above has been combined with Figure 6 The operation of splitting the current coding unit 400 or 450 describes an operation of splitting the non-square reference coding unit 1502 into one or more coding units. Therefore, a detailed description thereof will not be provided here.

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

[0287] According to an embodiment, the image decoding device 100 may use one or more reference coding units included in the maximum coding unit. That is, the maximum coding unit divided from the 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 maximum 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 maximum coding unit n times based on a quadtree structure. That is, the image decoding device 100 may determine the reference coding unit by dividing the maximum coding unit n times based on the quadtree structure, and may divide the reference coding unit based on at least one of the block shape information and the information about the division shape mode according to various embodiments.

[0288] Fig.18 A processing block serving as a criterion for determining an order of determining reference coding units included in the picture 1600 according to an embodiment is illustrated.

[0289] 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 the 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 the one or more reference coding units determined in each processing block may correspond to one of the various types of orders for determining the reference coding units, and may vary according to the processing block. The determination order of the reference coding units determined for each processing block may be one of various orders (e.g., raster scanning order, Z-shaped scanning, N-shaped scanning, upper right diagonal scanning, horizontal scanning, and vertical scanning), but is not limited to the above scanning order.

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

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

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

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

[0294] According to an embodiment, the image decoding apparatus 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 a determination order for one or more reference coding units based on the obtained determination order information. The determination order information may be defined as an order or direction for determining the reference coding units in the processing block. That is, the determination order of the reference coding units may be determined independently for each processing block.

[0295] According to an embodiment, the image decoding apparatus 100 may obtain the determination order information of the reference coding unit from the bitstream according to each specific data unit. For example, an obtainer (not shown) may obtain the determination order information of the reference coding unit from the 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 the reference coding unit indicates the order of the reference coding unit in the processing block, the determination order information may be obtained for each specific data unit including an integer number of processing blocks.

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

[0297] According to an embodiment, an obtainer (not shown) 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 apparatus 100 may determine a determination order of one or more reference coding units included in the processing blocks 1602 and 1612, and determine one or more reference coding units included in the picture 1600 based on the determination order. Fig.18 , the image decoding apparatus 100 may respectively determine determination orders 1604 and 1614 of one or more reference coding units in the processing blocks 1602 and 1612. For example, when determination order information of the reference coding units is obtained for each processing block, different types of determination order information of the reference coding units may be obtained for the processing blocks 1602 and 1612. When the determination order 1604 of the reference coding units in the processing block 1602 is a raster scan order, the reference coding units included in the 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 a reverse raster scan order, the reference coding units included in the processing block 1612 may be determined according to the reverse raster scan order.

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

[0299] 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 a division shape mode indicating a division method of the current coding unit from a bitstream, and may use the obtained information. The block shape information or the information about the division shape mode may be included in a bitstream associated with various data units. For example, the image decoding device 100 may use the block shape information or the information about the division shape mode included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, or a 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 division shape mode from a bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may use the obtained syntax element.

[0300] So far, various embodiments have been described. It will be apparent that those skilled in the art can easily make various changes to the basic features of the present disclosure without changing them. Therefore, it should be understood that the embodiments disclosed above are for illustrative purposes only and not for limiting purposes in all aspects. The scope of the present disclosure is defined in the claims rather than in the above detailed description, and it should be noted that all differences falling within the claims and their equivalents are included in the scope of the present disclosure.

[0301] At the same time, the embodiments of the present disclosure can be written as a program executable on a computer, and can be implemented on a general-purpose digital computer that runs the program using a computer-readable recording medium. The computer-readable recording medium may include storage media such as magnetic storage media (e.g., ROM, floppy disk, hard disk, etc.) and optical recording media (e.g., CD-ROM, DVD, etc.).

Claims

1. An image decoding method, comprising: dividing a first block included in an image based on information about at least one of a division type and a division direction of the first block to determine at least one second block from the first block; If a size of a second block in the at least one second block is equal to a predetermined size, setting the intra prediction mode to a prediction mode of the second block without obtaining information indicating the prediction mode of the second block from a bitstream; performing intra prediction on the second block based on the intra prediction mode set as the prediction mode of the second block of the at least one second block; and reconstructing the second block of the at least one second block, in: The partition type indicates one of two partitions, three partitions, and four partitions, and The width of the predetermined dimension is equal to 4 and the height of the predetermined dimension is equal to 4.

2. An image decoding device, comprising: at least one processor configured to: divide a first block included in an image based on information about at least one of a division type and a division direction of the first block to determine at least one second block from the first block; If the size of the second block in the at least one second block is equal to a predetermined size, setting the intra prediction mode to the prediction mode of the second block without obtaining information indicating the prediction mode of the second block from a bitstream; performing intra prediction on the second block based on the intra prediction mode set to the prediction mode of the second block in the at least one second block; and reconstructing said second block of said at least one second block, in: The partition type indicates one of two partitions, three partitions, and four partitions, and The width of the predetermined dimension is equal to 4 and the height of the predetermined dimension is equal to 4.

3. An image encoding method, comprising: dividing a first block included in an image based on at least one of a division type and a division direction of the first block to determine at least one second block from the first block; If the size of a second block in the at least one second block is equal to a predetermined size, setting the intra prediction mode to a prediction mode of the second block without generating information indicating the prediction mode of the second block to be included in a bitstream; performing intra prediction on the second block based on the intra prediction mode set as the prediction mode of the second block of the at least one second block; and encoding the second block in the at least one second block based on a prediction block of the second block in the at least one second block, in: The partition type indicates one of two partitions, three partitions, and four partitions, and The width of the predetermined dimension is equal to 4 and the height of the predetermined dimension is equal to 4.

Citation Information

Patent Citations

  • Method and apparatus of scalable video coding

    WO2012167713A1

  • Binary tree block partitioning structure

    WO2016090568A1