Image encoding method and device, and image decoding method and device
By optimizing the image division based on the block division type and direction and using intra-frame or inter-frame mode for prediction, the problem of low coding efficiency in high-resolution image coding is solved, and more efficient encoding and decoding is achieved.
Patent Information
- Application Number
- CN202210966065.6
- 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-09-30
- Estimated Expiration
- 2038-07-06
AI Technical Summary
In the existing technology, it is difficult to effectively use the size and shape information of blocks to perform optimized division and prediction in the encoding and decoding of high-resolution or high-definition image content, resulting in low encoding efficiency.
By dividing the image based on the block division type and direction, determining the size and shape of the second block, using intra-frame mode or inter-frame mode for prediction, and further dividing the block according to its shape and size until the predetermined size is reached, efficient encoding and decoding is achieved.
Improves the efficiency of image encoding and decoding, reduces memory bandwidth issues and throughput, and optimizes encoding performance.
Smart Images

Figure CN115348445B_ABST
Abstract
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 widespread use of hardware capable of reproducing and storing high-resolution or high-definition image content, the demand for codecs that can efficiently encode or decode high-resolution or high-definition image content continues to increase. Encoded image content is then reproduced by decoding it. Recently, methods for efficiently compressing such high-resolution or high-definition image content have been developed. For example, efficient image compression methods are implemented by processing the image to be encoded using an arbitrary method.
[0004] To compress an image, various data units may be used, and a containment relationship may exist between the data units. To determine the size of the data units used for image compression, the data units may be divided using various methods, and an optimized data unit may be determined based on the characteristics of the image so that encoding and decoding of the image can be performed. Summary of the Invention
[0005] According to an embodiment, an image decoding method includes: 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; 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 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 the size of the at least one second block is less than or equal to a predetermined size, determining the intra mode as the prediction mode of the at least one second block.
[0007] 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 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 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 area of the at least one second block is less than or equal to a predetermined value, determining the intra mode as the prediction mode of the at least one second block.
[0009] 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 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 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 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 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 mode as the prediction mode of the at least one second block.
[0011] 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 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 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 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 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 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: 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 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 partition type and a predetermined partition 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] An image decoding device according to an embodiment 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 the determined size and 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 an embodiment, the image encoding 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 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 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 the size of the at least one second block is less than or equal to a predetermined first size, determining the intra 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 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 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: 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 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 partition type and a predetermined partition 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 the 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] Figures 3a to 3f is a diagram for describing a process of dividing a block based on a division 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 the 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] Figure 9Illustrated is an 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.
[0034] Figure 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] Figure 11 A process in which an image decoding apparatus divides a first coding unit to determine at least one coding unit is illustrated.
[0036] Figure 12 It is shown that, in an image decoding apparatus according to an embodiment, when a non-square-shaped second coding unit determined as the image decoding apparatus splits a first coding unit satisfies a predetermined condition, a shape in which the second coding unit may be divided is restricted.
[0037] Figure 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] Figure 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 the coding units.
[0039] Figure 15 A process of determining the depth of a coding unit as the shape and size of the coding unit change when the coding unit is recursively split such that a plurality of coding units are determined is illustrated according to an embodiment.
[0040] Figure 16 Depths that may be determined based on shapes and sizes of coding units and partial indices (PIDs) for distinguishing coding units, according to an embodiment, are illustrated.
[0041] Figure 17 It is shown 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] Figure 18 Processing blocks serving as a criterion for determining an order of determining reference coding units included in a picture according to an embodiment are illustrated. DETAILED DESCRIPTION
[0043] The advantages and features of the disclosed embodiments and methods for achieving the advantages and features will be apparent by referring to the embodiments described below in conjunction with the accompanying drawings. 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 those skilled in the art 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 terms used in this disclosure while taking into account the functions of the present disclosure, the terms may vary according to the intentions of ordinary technicians in the field, judicial precedents, the emergence of new technologies, etc. In specific cases, terms arbitrarily selected by the applicant of this disclosure may also be used. In such cases, their meanings will be described in detail in the detailed description of this disclosure. Therefore, it is necessary to define the terms based on the meaning and content of the terms throughout the specification, rather than 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 states otherwise, the part does not exclude another component and may also include another component.
[0048] As used herein, the terms "component", "module" or "unit" represent software or hardware components that perform a predetermined function. However, the terms "component", "module" or "unit" are not limited to software or hardware. A "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, a "component", "module" or "unit" includes: a component (such as a software component, an object-oriented software component, a class component and a task component), a processor, a function, an attribute, a program, a subroutine, a program code segment, a driver, a firmware, a microcode, a circuit, data, a database, a data structure, a table, an array and a variable. The function provided in a component and a "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," a "module," or a "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, and the like. In some embodiments, a "processor" may indicate an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field-programmable gate array (FPGA), and the like. 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" can 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, and the like. When a processor can read information from and / or write information to a memory, the memory can 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 refer to 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, "samples," which are data assigned to sampling locations of an image, refer to data to be processed. For example, pixel values in an image in the spatial domain and transform coefficients in the transform domain may be samples. 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 those skilled in the art can easily implement the present disclosure. 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 The image encoding device, image decoding device, image encoding method and image decoding method according to the embodiment are described. Figures 5 to 18 A method for determining a data unit of an image according to an embodiment will be described with reference to Figures 1a to 4Described are encoding / decoding methods and apparatuses 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.
[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 a 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 apparatus 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. Furthermore, the predictor 105 and the image decoder 110 may include a memory storing instructions to be executed by the 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] An obtainer (not shown) may obtain information about a block partition shape pattern from a bitstream. The information about the block partition shape pattern may be syntax element information about the block partition shape pattern. In this case, the information about the block partition shape pattern may include at least one of information about whether the block is partitioned, information about the partition direction of the block, and information about the partition type of the block. The information about the partition direction of the block may be information indicating whether the block is partitioned horizontally or vertically. The information about the partition type of the block may be information indicating whether the block is partitioned into two or three. However, the information about the partition shape pattern of the block may include information indicating whether the block is partitioned into four. In this case, the information about whether the block is partitioned in the information about the partition shape pattern may indicate that the block is partitioned, the information about the partition direction of the block may indicate that the block is partitioned in both the horizontal and vertical directions, and the information about the partition type of the block may indicate that the block is partitioned 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, 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 based on at least one of a split type and a split direction of the first block included in the image 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 block division direction 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 for the at least one second block and whether to split 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 for 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 split based on the information about the block split shape mode. In addition, when determining whether to split the second block based on the size and shape of the second block, the second block may be further split.
[0065] When the size of at least one second block is less than or equal to a predetermined size (or less than the predetermined size), the predictor 105 may determine the intra mode as the prediction mode for 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 the predetermined size), the predictor 105 may determine the intra mode as the prediction mode for the second block.
[0066] When the size of at least one second block is greater than or equal to a predetermined size (or greater than the predetermined size), the predictor 105 may determine the inter mode as the prediction mode for 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 the predetermined size of 64×64 (or greater than the predetermined size), the predictor 105 may determine the inter mode as the prediction mode for 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-frame 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-frame mode as the prediction mode of the 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-frame 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. Alternatively, 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 the 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 width of the 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 the sum of the height and 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 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 for the second block. For example, when the sum of the height and 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 for the second block. For example, when the sum of the height and 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 for 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 for 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 the predetermined value K), the predictor 105 may determine the intra mode as the prediction mode for 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 for 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 inter mode as the prediction mode for 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 105 may determine inter mode as the prediction mode for 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 inter mode as the prediction mode for the second block.
[0074] The predictor 105 may determine an intra mode or an inter mode as the prediction mode for the at least one second block based on the shape of the second block. The predictor 105 may determine the prediction mode for 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 the ratio of the height to the 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 for the at least one second block to be a predetermined prediction mode. For example, the predetermined prediction mode may be one of an intra mode or an inter mode. In this case, the image decoding device 100 may determine the prediction mode for 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 square, the image decoding device 100 may obtain information about the prediction mode of the at least one second block from the bitstream to determine the prediction mode for the at least one second block, and determine the prediction mode for the second block based on the information about the prediction mode of the second block. However, it will be readily understood by those 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 the 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 readily understood by those skilled 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 for the second block in combination with the various embodiments described above. For example, when the height and width of the second block are greater than or equal to M and N (or greater than M and N) respectively (M and N are integers), the predictor 105 may determine intra mode as the prediction mode for the second block, and when the height and width of the second block are less than or equal to A and B (or less than A and B) respectively (A and B are integers), the predictor 105 may determine inter mode as the prediction mode for the second block. For example, when the height and width of the second block are greater than 64, the predictor 105 may determine inter mode as the prediction mode for 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 intra mode as the prediction mode for the second block.
[0078] When the 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 point, the predictor 105 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 image decoding device 100 may divide the second block into four parts to determine at least one third block without obtaining information about the division shape pattern of the second block from the bitstream. If 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 parts to determine a fourth block. In other words, the block may be recursively divided 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).
[0084] The above description relates to the case where the predetermined partition type is a four-partition. However, the predetermined partition type may be a two-partition, and the predetermined partition directions may be horizontal and vertical. In this case, as will be readily understood by those skilled in the art, the block can be partitioned in the same manner. The above description relates to the case where the predetermined partition type is a four-partition. However, the predetermined partition type or direction may be determined based on the shape of the current block. For example, if the current block is a rectangle with its long side extending horizontally, the predictor 105 may determine the partition direction to be vertical and determine a two-partition or a three-partition as the predetermined partition type. Alternatively, if the current block is a rectangle with its long side extending vertically, the predictor 105 may determine the partition direction to be horizontal and determine a two-partition or a three-partition 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 slice and the size of the at least one second block is greater than or equal to a predetermined size (or greater than the predetermined size), the image decoding apparatus 100 may split the at least one second block based on at least one of a predetermined split type and a predetermined split direction to determine at least one third block. However, as will be readily understood by those skilled in the art, when a slice including at least one second block is an intra slice and the size of the at least one second block is greater than or equal to the predetermined size (or greater than the predetermined size), the image decoding apparatus 100 may obtain information about a split shape pattern of the second block from a bitstream and split the second block based on the split 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 split. 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 split based on at least one of the size and shape of the at least one second block, the predictor 105 may split 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 large, a large minimum block size may not significantly affect encoding / decoding performance. Therefore, by determining the minimum block size based on the image size, it is possible to reduce external memory bandwidth issues that may occur when encoding / decoding using small blocks (such as 4×4 blocks). Furthermore, it is possible to prevent excessive throughput from being generated during the parsing process of small blocks.
[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 codec level and the resolution of the image, the image encoding / decoding device may be implemented so as to determine the size of the minimum block by considering only at least one of the codec level 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 a minimum block area based on the level of the codec. The size of a block that can 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] Furthermore, the image decoding device 100 may determine the minimum block size based on the image resolution. For example, the image decoding device 100 may determine the minimum block size based on the resolution of a predetermined image. When the predetermined image resolution is 3840×2160, the image decoding device 100 may determine the minimum block size to be one of an M×N block size or a larger block size (M and N are integers). When the image size is large, a large minimum block size may not significantly impact encoding / decoding performance. Therefore, by determining the minimum block size based on the image size, external memory bandwidth issues that may occur when encoding / decoding using small blocks (such as 4×4 blocks) can be reduced. Furthermore, excessive throughput can be prevented during the parsing process of small blocks. Furthermore, when the codec level value is less than or equal to a predetermined value, the image decoding device 100 may determine the maximum block size to be a predetermined size (e.g., 64×64). Furthermore, when the image resolution is lower than the predetermined resolution, the image decoding device 100 may determine the maximum block size to be a predetermined size (e.g., 64×64).
[0099] When 4×4, 4×8, and 8×4 blocks are permitted for decoding of luma components, the image decoding apparatus 100 may determine 2×2, 2×8, and 4×2 as the permitted block sizes for chroma components corresponding to the permitted luma component blocks. When the image decoding apparatus 100 receives residual information (residual information regarding transform coefficients of a block) for a 2×N (N is an integer) or N×2 (N is an integer) block and parses the residual information, excessive throughput may result. Therefore, when the current block is a 2×N or N×2 block, the image decoding apparatus 100 may not obtain residual information from the bitstream. For example, the image decoding apparatus 100 may determine the mode of the current block as skip mode without obtaining a flag for skip mode. When the image decoding apparatus 100 determines the mode of the current block as skip mode, the image decoding apparatus 100 may not obtain 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 the value of the coded block pattern information for the 2×N component or the N×2 component, the coded block flag (cbf_cb and cbf_cr), or the root_cbf value to be 0. Here, the coded block pattern information, the coded block flag (cbf_cb and cbf_cr) information, or the root_cbf may be information indicating whether all values of the transform 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 the at least one second block based on a prediction block for the block included in the 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 transform based on the information about the residual to obtain a residual block for the block included in the second block. Subsequently, the image decoder 110 may reconstruct the block included in the at least one second block based on the residual block and the prediction block for the block included in the 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 the 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 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. 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 for the at least one second block and whether to split 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 intra mode or inter mode as the prediction mode for 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 whether the second block is split based on at least one of the size and shape of the at least one second block. If the image decoding apparatus 100 determines that the second block is split, the image decoding apparatus may determine at least one third block by splitting the second block based on at least one of a predetermined split type and a predetermined split direction of the second block.
[0107] In operation S115, the image decoding apparatus 100 may obtain a prediction block for a block included in the at least one second block based on one of a prediction mode and whether the at least one second block is partitioned. The image decoding apparatus 100 may predict the second block based on the determined prediction mode to obtain a prediction block for the second block. Alternatively, when the image decoding apparatus 100 determines to partition the 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 the at least one third block based on the prediction mode to obtain a prediction mode for the at least one third block.
[0108] In operation S120, the image decoding apparatus 100 may reconstruct the blocks included in the second block based on the prediction blocks of the blocks included in the second block. The image decoding apparatus 100 may obtain information about the residuals of the blocks included in the second block from the bitstream, and perform inverse quantization / inverse transform based on the information about the residuals to obtain residual blocks of the blocks included in the second block. Subsequently, the image decoder 110 may reconstruct the blocks included in the at least one second block based on the residual blocks and the prediction blocks of the blocks included in the at least one second block. That is, the image decoder 110 may add the sample values of the prediction blocks for the blocks included in the at least one second block to the sample values of the residual blocks to determine the sample values of the reconstructed blocks.
[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 quantized transform coefficients, and the inverse quantizer 6200 and the inverse transform 6250 may reconstruct residual data from the quantized transform coefficients.
[0112] The intra-frame predictor 6400 can perform intra-frame prediction for each block. The inter-frame predictor 6350 can perform inter-frame prediction for each block using the reference image obtained from the reconstructed image buffer 6300. The prediction data for each block generated by the intra-frame predictor 6400 and the inter-frame predictor 6300 can be added to the residual data so that the spatial domain data of the block of the current image can be reconstructed. The deblocker 6450 and the SAO performer 6500 can perform loop filtering on the spatial domain reconstructed data to output a filtered reconstructed image 6600. In addition, the reconstructed image stored in the reconstructed picture buffer 6300 can be output as a reference image. Figure 1c The intra predictor 6400 and the inter 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, phased tasks 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 included in the image based on at least one of a division type and a division direction for the first block 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 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 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 for the at least one second block and whether to split 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 split. In addition, when whether to split 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 split.
[0119] When the size of at least one second block is less than or equal to a 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), which is 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 a predetermined size (or greater than a predetermined size), the predictor 155 may determine the inter mode as the prediction mode for 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, which is the predetermined size, the predictor 155 may determine the inter mode as the prediction mode for 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-frame 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-frame mode as the prediction mode of the 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-frame 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. Alternatively, 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 the 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 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 mode as the prediction mode of the second block. For example, when the sum of the height and 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 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 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 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 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 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 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 the 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 inter mode as the prediction mode for 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 inter mode as the prediction mode for 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 inter mode as the prediction mode for the second block.
[0128] The predictor 155 may determine an intra mode or an inter mode as the 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 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 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 the information about the prediction mode of the second block. That is, the image encoding device 150 may not include the 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 a 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 the 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 skilled in the art that when at least one second block is non-square, the prediction mode of the 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 those skilled 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 the 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 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 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 the at least one second block is an intra slice and the size of the at least one second block is greater than or equal to a predetermined size (or greater than the predetermined size), the predictor 155 may determine that the at least one second block is split. In this case, the predictor 155 may split the at least one second block based on at least one of a predetermined split type and a predetermined split direction to determine at least one third block. For example, the predictor 155 may split 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 split the at least one third block into four to determine a fourth block. In other words, the predictor 155 may recursively split the current block based on at least one of a predetermined split type and a predetermined split 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 a four-partition. However, the predetermined partition type may be a two-partition, and the predetermined partition directions may be horizontal and vertical. In this case, as will be readily understood by those skilled in the art, the block can be partitioned in the same manner. The above description relates to the case where the predetermined partition type is a four-partition. However, the predetermined partition type or direction is determined based on the shape of the current block. For example, if the current block is a rectangle with its long side extending horizontally, the predictor 155 may determine the vertical direction as the partition direction and determine a two-partition or three-partition as the predetermined partition type. Alternatively, if the current block is a rectangle with its long side extending vertically, the predictor 155 may determine the horizontal direction as the partition direction and determine a two-partition or three-partition 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 slice and the size of the 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, as will be readily understood by those skilled in the art, when a slice including at least one second block is an intra slice and the size of the 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 a division shape mode for the second block from among the various division shape modes based on 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 a block included in the at least one second block based on a prediction 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 a sample value of an original block of the block included in the at least one second block and a sample value of a prediction 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 slice, the image encoder 160 determines that the second block is split based on at least one of the size and shape of the block, and the image encoder 160 splits 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, the image encoder 160 may encode information regarding the split shape pattern of the second block, include the information regarding the split shape pattern of the second block in the bitstream, and output the bitstream. In this case, the information regarding the split shape pattern of the second block may indicate that the second block is not split. The image decoding device 100 may obtain the information regarding the split 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 split based on the information regarding the split shape pattern obtained from the bitstream. In this case, the image decoding device 100 may determine that the second block is split based on at least one of the size and shape of the block, and split the second block based on at least one of the predetermined split type and a predetermined split direction to determine at least one third block. Furthermore, the image decoding device 100 may predict the at least one third block based on a prediction mode. Therefore, when the current slice is an intra slice, the image encoding apparatus 150 can reduce the amount of information about the division shape mode to be explicitly signaled through the bitstream, and the image decoding apparatus 100 can divide the block based on the information about the division shape mode received through the bitstream and perform prediction based on the divided block as with the image encoding apparatus 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 information of the encoded 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 transform and quantize the residual data to output quantized transform coefficients for each block. The inverse quantizer 7450 and the inverse transformer 7500 may perform inverse quantization and inverse transform on the quantized transform coefficients to reconstruct spatial domain residual data. The reconstructed spatial domain residual data may be added to the prediction data for each block output from the intra predictor 7200 or the inter predictor 7150 to thereby reconstruct spatial domain data for the block of the current image 7050. The deblocker 7550 and the SAO performer 7600 may perform loop filtering on the reconstructed spatial domain data to generate a filtered reconstructed image. The resulting 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-frame 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 predictor 7200 and the inter 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 , phased tasks of the image encoder 7000 according to various embodiments may be performed for each block.
[0154] Figures 3a to 3f is a diagram for describing a process of dividing a block based on a division 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 pattern of the first block 200 based on the information about the division shape pattern 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 pattern of the first block 200 from the bitstream. In this case, the information about the division shape pattern 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 pattern 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 pattern 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 pattern of the first block 210 based on the information about the division shape pattern 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 pattern of the first block 210 from the bitstream. In this case, the information about the division shape pattern 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 pattern 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 pattern 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 pattern of the first block 220 based on the information about the division shape pattern 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 pattern of the first block 220 from the bitstream. In this case, the information about the division shape pattern 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 pattern 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 pattern 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 pattern of the first block 230 based on the information about the division shape pattern 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 pattern of the first block 230 from the bitstream. In this case, the information about the division shape pattern 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 pattern 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 pattern 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 pattern of the first block 240 based on the information about the division shape pattern 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 pattern of the first block 240 from the bitstream. In this case, the information about the division shape pattern 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 pattern 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 pattern 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 pattern of the first block 250 based on the information about the division shape pattern 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 pattern of the first block 250 from the bitstream. In this case, the information about the division shape pattern 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 pattern 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 pattern may indicate a vertical direction.
[0166] The image decoding apparatus 100 may divide the first block 250 into a second block 255 and a 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 larger 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 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 for a block based on the size of the block, thereby reducing the amount of prediction mode information to be explicitly signaled through a bitstream while maintaining decoding performance and reducing the complexity of the image decoding apparatus 100 .
[0168] So far, reference has been made to Figures 3a to 3f The case where the image decoding apparatus 100 determines the intra mode as the prediction mode of the corresponding block when the block size is 4×4 is described in detail. However, it will be easily understood by those skilled 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 the 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 slice (if (current slice type is inter 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 the inter 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 temporally / spatially surrounding blocks) and perform inter 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. Alternatively, when the mode of the current block is the intra mode, the image decoding device 100 may perform intra 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 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 predicted 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 slice), the image decoding apparatus 100 may determine the value of skip_flag to be 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 (current slice type is inter slice && block size != 4x4)), the image decoding device 100 may obtain syntax element information pred_mode_flag indicating 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 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 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 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 the block is the skip mode and determines the intra mode as the prediction mode of the corresponding block when the block size is 4×4 has been described in detail. However, it will be readily understood by those skilled in the art that whether the mode of the block is the skip mode and the intra mode may be determined as the prediction mode of the corresponding block based on blocks of various sizes.
[0175] Generally, image decoding devices obtain information about the prediction mode of the current block from the bitstream without considering the size of the current block, and determine 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, depending on the situation. This reduces the amount of prediction mode information that must be explicitly signaled through the bitstream while maintaining decoding performance and reduces 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 the 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 intra-frame mode rather than inter-frame mode, a gain can be obtained in view of the external memory bandwidth requirement.
[0179] For example, image encoding / decoding devices may perform intra-frame prediction on large-sized blocks. Because the residual value obtained by transforming / inverse-transforming the residual generated based on intra-frame prediction is generally larger than the residual value generated by inter-frame prediction, the computational complexity of the transform / inverse-transform task can increase as the size of the transform / inverse-transform matrix increases. Therefore, by forcing the prediction mode of relatively large-sized blocks to inter-frame mode rather than intra-frame mode, gains can be achieved 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] An image may be divided into 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. Furthermore, 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 division is to be performed, division direction information, and division type information. The information indicating whether division is to be performed may indicate whether the coding unit is to be divided. The division direction information may indicate one of a horizontal direction or a vertical direction in which the coding unit is to be divided. The division type information may indicate one of two divisions, three divisions, or four divisions in which the coding unit is to be divided.
[0182] For ease of description, this disclosure describes a case where the information about the division shape pattern is divided into information indicating whether to perform division, division direction information, and division type information. However, this disclosure is not limited to this case. The image decoding device 100 can obtain the information about the division shape pattern as an empty string from the bitstream. The image decoding device 100 can determine whether to perform division on 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 mode 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 mode 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 mode for the coding unit of the lower depth indicates that the division is performed, the coding unit of the lower depth may be divided into coding units of a smaller size. However, the operation of dividing the 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] Furthermore, a coding unit may be divided into prediction units for predicting an image. A prediction unit may be equal to or smaller than a coding unit. Furthermore, a coding unit may be divided into transformation units for transforming an image. A transformation unit may be equal to or smaller than a coding unit. The shape and size of a transformation unit may not be associated with the shape and size of a prediction unit. A coding unit may be distinguished from a prediction unit and a transformation unit, however, a coding unit, a prediction unit, and a transformation unit may be the same. The prediction unit and the transformation unit may be divided in the same manner as the coding unit. 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 a maximum coding unit, a coding unit, a prediction unit, and a transform 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 spatially or temporally adjacent to the current block. The surrounding blocks may be located at one of the lower left, left, upper left, upper side, upper right, right, 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 the shape, direction, ratio, or size of the width and height of the 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 non-square. When the shape of the coding unit is non-square, the image decoding apparatus 100 may determine the ratio of the width to the height in the block shape information of the coding unit to be 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 split 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 a coding unit by using block shape information, and may determine a division method of the coding unit by using information about a 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 pattern from the bitstream. However, the image decoding device 100 and the image encoding device 150 may obtain information about a predetermined division shape pattern based on block shape information. The image decoding device 100 may obtain information about the predetermined division shape pattern 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 pattern for the maximum coding unit as four-division. Furthermore, the image decoding device 100 may determine the information about the division shape pattern 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 pattern to be four-division. Four-division may be a division shape pattern that divides both the width and height of the coding unit into two equal parts. Based on the information about the division shape pattern, the image decoding device 100 may obtain a 128×128 coding unit from the 256×256 maximum coding unit. Furthermore, 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 mode 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 mode 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 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 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 and horizontal directions based on the information about the division shape pattern indicating that division is performed in the vertical and horizontal directions. 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 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 to be 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 division 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 pattern indicates that the coding unit is divided into an odd number of blocks (three-partition), the image decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450. For example, when the information about the division shape pattern 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 to the height of the current coding unit 400 or 450 may be 4:1 or 1:4. When the ratio of the width to the height is 4:1, since the length of the width is longer than the length of the height, the block shape information may be in the horizontal direction. When the ratio of the width to the height is 1:4, since the length of the width is shorter than the length of the height, the block shape information may be in the vertical direction. The image decoding apparatus 100 may determine that the current coding unit is divided into an odd number of blocks based on the information about the division shape mode. In addition, the image decoding apparatus 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 apparatus 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 480 a , 480 b , and 480 c .
[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 units determined by splitting 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 a decoding process for 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 split to be different from a decoding process for 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 located at the center to not be split again or to be split 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 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 to be divided horizontally, the image decoding device 100 may determine the second coding unit 510 by dividing the first coding unit 500 horizontally. The first coding unit, second coding unit, and third coding unit used in the embodiment are terms used to understand the relationship before and after the 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 based on at least one piece of information among block shape information and information about a division shape mode. Figure 7The 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 on the division 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 on the division shape mode, and determine a plurality of second coding units (e.g., 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 on the division shape mode, and may split the second coding unit 510 by using the splitting method of the first coding unit 500 based on at least one of the block shape information and the information on the division shape mode. According to an embodiment, when the first coding unit 500 is divided into the second coding unit 510 based on at least one of the block shape information and the information about the division shape mode of the first coding unit 500, 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 and at least one of the information about the division shape mode of the second coding unit 510. That is, the coding unit can be recursively divided based on at least one of the block shape information and the information about the division shape mode of each coding unit. Therefore, a square coding unit can be determined by dividing a non-square coding unit, and a non-square coding unit can be determined by recursively dividing 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, the 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 along the horizontal direction. The non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d may be further divided into a plurality of coding units. For example, the non-square fourth coding unit 530b or 530d may be further divided into an odd-numbered coding unit. A method that can 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 regarding the division shape pattern. Furthermore, the image decoding apparatus 100 may determine not to divide the second coding unit 510 based on at least one of the block shape information and the information regarding the division shape pattern. 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 predetermined third coding units among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding apparatus 100 may restrict the third coding unit 520c located at the center of the odd number of third coding units 520b, 520c, and 520d from being further divided or from being divided a set number of times.
[0206] Reference Figure 7 , the image decoding apparatus 100 may limit the third coding unit 520c located at the center position among the odd-numbered 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 piece of information 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 (e.g., a sample 640 or 690 at a center position) among a plurality of samples included in the current coding unit 600 or 650. However, the predetermined position in the current coding unit 600 from which at least one piece of information of the block shape information and the information on the division shape mode can be obtained is not limited to Figure 8 , and may include various positions (for example, 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 piece of information among block shape information and information about a 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 the 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 an odd number of coding units 620a, 620b, and 620c or an 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 center coding unit 620b 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 samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, 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 samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may include information indicating the width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and the width or height may correspond to 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 central position of the coding unit 620b by directly using the information about the positions or coordinates of the coding units 620a, 620b, and 620c in the picture, or by using 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 included in the coding units 620a, 620b, and 620c, respectively. 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 splitting 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 picture, 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 using the coordinates (xa, ya) indicating the position of the upper left sample point 630a of the upper coding unit 620a, the coordinates (xb, yb) indicating the position of the upper left sample point 630b of the center coding unit 620b, and the coordinates (xc, yc) 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 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-described 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 sizes of the coding units 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) representing the position of the upper left sample point 670a of the left coding unit 660a, the coordinates (xe, ye) representing the position of the upper left sample point 670b of the center coding unit 660b, and the coordinates (xf, yf) 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 apparatus 100 may determine the width of the left coding unit 660a as xe-xd. The image decoding apparatus 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 apparatus 100 may determine the width of the center coding unit 660b as xf-xe. The image decoding apparatus 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 apparatus 100 may determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the center coding unit 660b. 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 660a, 660b, and 660c. With reference 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 the 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 coordinates. Therefore, various processes of determining the coding unit at the predetermined position by comparing the sizes of the coding units determined based on the predetermined sample 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, taking into account 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 even-numbered coding units. The image decoding apparatus 100 may determine an even-numbered coding unit by dividing (dividing) a current coding unit and determine a coding unit at a predetermined position by using information about the positions of even-numbered coding units. Operations related thereto may be similar to those already described above. Figure 8 The operation of determining a coding unit at a predetermined position (eg, a center position) from among the odd-numbered 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 a coding unit at a predetermined position may be used in a splitting 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 among block shape information stored in a sample included in a center coding unit and information about a split shape pattern in the splitting operation to determine the coding unit at the center position from among the plurality of coding units determined by splitting the current coding unit.
[0223] Reference Figure 8The image decoding apparatus 100 may divide the current coding unit 600 into multiple coding units 620a, 620b, and 620c based on at least one of the block shape information and the information on the division shape mode, and may determine the central coding unit 620b from the multiple coding units 620a, 620b, and 620c. Furthermore, the image decoding apparatus 100 may determine the central coding unit 620b by taking into account the location 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 and at least one of the information on the division shape mode of the current coding unit 600 may be obtained from a sample 640 at the central position of the current coding unit 600, and when the current coding unit 600 is divided into the multiple 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 central coding unit. However, information used to determine the coding unit at the center position is not limited to at least one of block shape information and information about a division shape pattern, 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 determine a coding unit at a predetermined position (for example, a coding unit at a center position among the plurality of divided coding units) from the plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, using 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. That is, the image decoding apparatus 100 may 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 the plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600 by considering the block shape of the current coding unit 600, and may impose a predetermined restriction on the coding unit 620b. With reference to Figure 8 According to an embodiment, the image decoding apparatus 100 may determine a sample 640 at the center position of the 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 the 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 can 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 can 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 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 the 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 the division shape pattern to determine the 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 the division shape pattern from a sample at a predetermined position in the coding unit, and divide the plurality of coding units by using block shape information and at least one piece of information about the division shape pattern obtained from a sample at a predetermined position in each of the plurality of coding units generated by dividing the current coding unit. That is, the coding unit may be recursively divided based on the block shape information obtained from the sample at the predetermined position in each coding unit and at least one piece of information about the division shape pattern. 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] Figure 9 Illustrated is 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.
[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 the division shape mode.
[0230] Reference Figure 9 , the image decoding apparatus 100 may determine to process the second coding units 710a and 710b determined by splitting 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 splitting 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 splitting 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. Figure 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 Figure 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 third coding units 720a and 720b by splitting the second coding unit 710a on the left in a horizontal direction, and may not split the second coding unit 710b on the right.
[0233] According to an embodiment, the order in which the coding units are processed may be determined based on the operation of splitting the coding units. In other words, the order in which the coding units are split may be determined based on the order in which the coding units were processed immediately before the splitting. The image decoding apparatus 100 may determine the order in which the third coding units 720a and 720b, determined by splitting the second coding unit 710a on the left, are processed independently of the second coding unit 710b on the right. Because the third coding units 720a and 720b are determined by splitting the second coding unit 710a on the left horizontally, the third coding units 720a and 720b may be processed in a vertical order 720c. Because the second coding unit 710a on the left and the second coding unit 710b on the right are processed in a horizontal 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 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 into various shapes in a predetermined order.
[0234] Figure 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 information about the division shape mode. Figure 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. Figure 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, wherein 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 between 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. However, 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 conditions are not met as described above, the image decoding apparatus 100 may determine that the scan order is broken, and may determine, based on the result of the determination, that the second coding unit 810b on the right side is divided into an odd number of coding units. 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 units at predetermined positions in the divided coding units. The restrictions or predetermined positions have been described above in conjunction with various embodiments, and therefore a detailed description thereof will not be provided here.
[0238] Figure 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 Figure 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. Figure 11Because the boundaries of the second coding units 910a, 910b, and 910c determined by splitting the square first coding unit 900 vertically 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 conditions for processing in a predetermined order. Furthermore, because the boundaries of the second coding units 920a, 920b, and 920c determined by splitting the square first coding unit 900 horizontally 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 conditions for processing in a predetermined order. When the conditions are not met as described above, the image decoding apparatus 100 may determine that the scan order is broken and, based on the result of the determination, determine that the first coding unit 900 is split into an odd number of coding units. According to an embodiment, when a coding unit is split into an odd number of coding units, the image decoding apparatus 100 may impose predetermined restrictions on coding units at predetermined positions within the split coding units. The restrictions or predetermined positions have been described above in conjunction with various embodiments, and therefore 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 Figure 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] Figure 12 It is shown that shapes into which the second coding unit may be divided are limited 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 split a 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 an obtainer (not shown) and the information on the division shape mode. The second coding units 1010a and 1010b or the second coding units 1020a and 1020b may be independently divided. As such, the image decoding apparatus 100 may determine whether to split each of the second coding units 1010a and 1010b or the second coding units 1020a and 1020b into multiple coding units based on at least one of the block shape information and the information on the division shape mode of each of the second coding units 1010a and 1010b or the second coding units 1020a and 1020b. According to an embodiment, the image decoding apparatus 100 may determine the third coding units 1012a and 1012b by horizontally splitting the non-square left second coding unit 1010a determined by vertically splitting the first coding unit 1000. However, when the left second coding unit 1010a is split horizontally, the image decoding apparatus 100 may limit the right second coding unit 1010b to not be split in the horizontal direction in which the left second coding unit 1010a is split. When the third coding units 1014a and 1014b are determined by splitting the right second coding unit 1010b in the same direction, since the left second coding unit 1010a and the right second coding unit 1010b are independently split horizontally, 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 apparatus 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 a 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] Figure 13 A process of splitting a square coding unit when information about a division shape pattern fails to 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 splitting the first coding unit 1100 based on at least one of block shape information and information about a division shape pattern. The information about the division shape pattern may include information about various methods for splitting the coding unit, but the information about the various division methods may not include information for splitting the coding unit into four square coding units. Based on such information about the division shape pattern, the image decoding apparatus 100 may not split the square first coding unit 1100 into the 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 pattern.
[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 horizontally dividing the second coding unit 1110a on the left, and square third coding units 1114a and 1114b by horizontally dividing the second coding unit 1110b on the right. Furthermore, the image decoding apparatus 100 may determine square third coding units 1116a, 1116b, 1116c, and 1116d by horizontally dividing both the second coding unit 1110a on the left and the second coding unit 1110b on the right. In this case, coding units having the same shape as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0250] As another example, the image decoding apparatus 100 may determine square third coding units 1122a and 1122b by vertically dividing the upper second coding unit 1120a, and may determine square third coding units 1124a and 1124b by vertically dividing the lower second coding unit 1120b. Furthermore, the image decoding apparatus 100 may determine square third coding units 1126a, 1126b, 1126c, and 1126d by vertically dividing both the upper second coding unit 1120a and the lower second coding unit 1120b. In this case, coding units having the same shape as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0251] Figure 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 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. Figure 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 can 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 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 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 Figure 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 the coding units in a predetermined order. Figure 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. Figure 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.
[0254] 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.
[0255] 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 upper second coding unit 1220a in the horizontal direction and then process the third coding units 1226c and 1226d included in the lower second coding unit 1220b in the horizontal direction.
[0256] Reference Figure 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, unlike the second coding units 1220a and 1220b determined 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 coding units of the same shape as those 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 block shape information and information about a split shape pattern, the image decoding apparatus 100 can process a plurality of coding units in different orders even when the coding units are ultimately determined to have the same shape.
[0257] Figure 15 A process of determining the depth of a coding unit as the shape and size of the coding unit change when the coding unit is recursively split such that a plurality of coding units are determined is illustrated according to an embodiment.
[0258] According to an embodiment, the image decoding apparatus 100 may determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before being split is 2n times (n>0) the length of the long side of the split current coding unit, the image decoding apparatus 100 may determine that the depth of the current coding unit is increased by n from the depth of the coding unit before being split. In the following description, a coding unit with an increased depth is expressed as a coding unit of a deeper depth.
[0259] Reference Figure 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, where 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.
[0260] 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 dividing 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 with a height longer than a width, or expressed as "2: NS_HOR" indicating a non-square with a width longer than a height).
[0261] 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.
[0262] 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.
[0263] 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 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 splitting the second coding unit 1302 in vertical and horizontal directions.
[0264] 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.
[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 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.
[0266] 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.
[0267] 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.
[0268] Figure 16 Depths that may be determined based on shapes and sizes of coding units and partial indices (PIDs) for distinguishing coding units, according to an embodiment, are illustrated.
[0269] 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. Figure 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.
[0270] 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 on 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, since 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.
[0271] 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.
[0272] 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 side 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, since 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.
[0273] 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 pattern. 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 height by using the above-described method of determining the depths of the coding units split from the first coding unit 1410 .
[0274] 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. Figure 16, the center-positioned coding unit 1414b 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 center-positioned coding unit 1414b may include two other coding units 1414a or 1414c. Therefore, when the PID of the center-positioned coding unit 1414b is 1 based on the scan order, the PID of the coding unit 1414c located next to the coding unit 1414b may be increased by 2 and thus may be 3. That is, there may be discontinuity in the PID values. According to an embodiment, the image decoding apparatus 100 may determine whether the odd-numbered divided coding units are not of equal size based on whether there is discontinuity in the PIDs used to identify the divided coding units.
[0275] 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. Figure 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 at a predetermined position (e.g., an upper left sample) of each coding unit.
[0276] According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a predetermined position from among the divided coding units by using a PID used to distinguish between the coding units. According to an embodiment, when information about a division shape mode of a first coding unit 1410 having a rectangular shape whose height is longer than its 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 an odd number of divided coding units to determine a coding unit at a center position from among the multiple coding units. The image decoding apparatus 100 may determine the coding unit 1414b having a PID corresponding to the center value among the PIDs of the multiple coding units as the coding unit at the center position among the multiple 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. Figure 16 , coding unit 1414b generated by splitting the first coding unit 1410 may have a width equal to that of the other coding units 1414a and 1414c and a height twice that of the other coding units 1414a and 1414c. In this case, when the PID of the central coding unit 1414b is 1, the PID of the coding unit 1414c located next to the coding unit 1414b may be increased by 2 to 3. When the PIDs are not increased evenly as described above, the image decoding apparatus 100 may determine that the coding unit is split 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 pattern indicates that the coding unit is split into an odd number of coding units, the image decoding apparatus 100 may split the current coding unit such that a coding unit at a predetermined position (e.g., a central position coding unit) 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 central position coding units 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 examples, and various positions and various sizes of the coding unit and various PIDs may be used.
[0277] According to an embodiment, the image decoding apparatus 100 may use a predetermined data unit that is recursively divided starting from a coding unit.
[0278] Figure 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.
[0279] According to an embodiment, a predetermined data unit may be defined as a data unit from which the coding unit is recursively divided 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 the highest depth of a plurality of coding units divided from the current picture. In the following description, for ease of explanation, the predetermined data unit is referred to as a reference data unit.
[0280] Depending on the embodiment, the reference data unit may have a predetermined size and a predetermined size shape. Depending on the embodiment, the reference coding unit may include M×N samples. Here, M and N may be equal to each other and may be integers representing multiples 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.
[0281] According to an embodiment, the image decoding apparatus 100 may divide a 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 units may correspond to a division operation using a quadtree structure.
[0282] 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 units.
[0283] Reference Figure 17 , the image decoding apparatus 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. Depending on 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.
[0284] According to an embodiment, the obtainer (not shown) of the image decoding apparatus 100 may obtain at least one of the reference coding unit shape information and the reference coding unit size information for each of the various data units from the bitstream. 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 dividing the current coding unit 400 or 450 describes an operation of dividing the non-square reference coding unit 1502 into one or more coding units. Therefore, a detailed description thereof will not be provided here.
[0285] According to an embodiment, the image decoding apparatus 100 may determine the size and shape of a reference coding unit based on a predetermined number of data units using a PID for identifying the size and shape of the reference coding unit. That is, an obtainer (not shown) may obtain only the PID for identifying the size and shape of the reference coding unit for each slice, slice segment, or maximum coding unit from the bitstream, where each slice, slice segment, or maximum coding unit is a data unit that satisfies the predetermined condition (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.). 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 obtaining and using reference coding unit shape information and reference coding unit size information from the bitstream based on each relatively small data unit, using the bitstream may be inefficient. Therefore, instead of directly obtaining the reference coding unit shape information and reference coding unit size information, only the PID may be obtained and used. 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 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 sizes and shapes of predetermined reference coding units based on the PID.
[0286] According to an embodiment, the image decoding apparatus 100 may use one or more reference coding units included in a 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 apparatus 100 may determine the reference coding unit by dividing the maximum coding unit n times based on a quadtree structure, and may divide the reference coding unit based on at least one of the block shape information and the information about the division shape pattern according to various embodiments.
[0287] Figure 18 Processing blocks serving as a criterion for determining an order of reference coding units included in the picture 1600 according to an embodiment are illustrated.
[0288] According to an embodiment, the image decoding apparatus 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 various types of orders for determining 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 scan order, Z-shaped scan, N-shaped scan, upper right diagonal scan, horizontal scan, and vertical scan), but is not limited to the above-mentioned scan order.
[0289] 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.
[0290] According to an embodiment, an obtainer (not shown) of the image decoding apparatus 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 the 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 the bitstream according to each of the various data units, and the image decoding apparatus 100 may determine the size of one or more processing blocks divided from the 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.
[0291] 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. Figure 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 order in which one or more reference coding units in one or more processing blocks are determined.
[0292] 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 determining the size of the reference coding unit.
[0293] 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 the 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.
[0294] According to an embodiment, the image decoding apparatus 100 may obtain the determination order information of the reference coding units from the bitstream for each specific data unit. For example, an obtainer (not shown) may obtain the determination order information of the reference coding units from the bitstream for each data unit (such as an image, sequence, picture, slice, slice segment, or processing block). Because the determination order information of the reference coding units indicates the order used to determine the reference coding units in the processing block, the determination order information may be obtained for each specific data unit including an integer number of processing blocks.
[0295] According to an embodiment, the image decoding apparatus 100 may determine one or more reference coding units based on the determined order.
[0296] 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 the 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. Figure 18 , the image decoding apparatus 100 may determine determination orders 1604 and 1614 of one or more reference coding units in processing blocks 1602 and 1612, respectively. For example, when determination order information of reference coding units is obtained for each processing block, different types of determination order information of reference coding units may be obtained for processing blocks 1602 and 1612. When the determination order 1604 of the reference coding units in processing block 1602 is a raster scan order, the reference coding units included in processing block 1602 may be determined according to the raster scan order. Conversely, 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 processing block 1612 may be determined according to the reverse raster scan order.
[0297] 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. Methods for decoding the reference coding units may include various image decoding methods.
[0298] According to an embodiment, the image decoding device 100 may obtain block shape information indicating the shape of the current coding unit or information on 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 on 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 on 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 on 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.
[0299] So far, various embodiments have been described. It will be apparent that those skilled in the art can easily make various changes to the present disclosure without changing the basic characteristics thereof. Therefore, it should be understood that the embodiments disclosed above are for illustrative purposes only and not for restrictive 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.
[0300] 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 of the at least one second block based on the intra prediction mode set as the prediction mode of the second block; and reconstructing the second block of the at least one second block, in: The partition type indicates one of two-partition, three-partition, and four-partition.
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 a size of a second block in the at least one second block is equal to a predetermined size, setting an 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; and performing intra prediction on the second block based on the intra prediction mode set as 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-partition, three-partition, and four-partition.
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 a size of a second block among 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 of the at least one second block based on the intra prediction mode set as the prediction mode of the second block; and encoding the second block of the at least one second block based on a prediction block of the second block of the at least one second block, in: The partition type indicates one of two-partition, three-partition, and four-partition.
Citation Information
Patent Citations
Image encoder and decoder using unidirectional prediction
CN103384333A
Image encoding apparatus, method of image encoding, and recording medium, image decoding apparatus, method of image decoding, and recording medium
CN104396259A