Methods and equipment for image decoding, image encoding methods, and bitstream transmission equipment.

VN10063137BActive Publication Date: 2026-11-20SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
VN1202406315
Authority / Receiving Office
VN · VN
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-10-10
Filing Date
2019-07-30
Publication Date
2026-11-20
Estimated Expiration
2039-07-30

AI Technical Summary

Technical Problem

Current video encoding and decoding technologies face challenges in efficiently handling high-resolution or high-definition video content, particularly in determining optimal data units for compression and performing deblocking filtering effectively across various prediction modes.

Method used

The method involves hierarchically dividing images into blocks, generating prediction and residual blocks, and applying deblocking filtering on the boundaries of restored blocks based on determined boundary filtering strength values, which are predicated on the prediction modes and block sizes of adjacent blocks, using segmentation modes to optimize the encoding and decoding process.

Benefits of technology

This approach enhances the efficiency of video encoding and decoding by optimizing data unit sizes and filtering strengths, leading to improved compression and playback of high-resolution video content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure VN1202406315_0
    Figure VN1202406315_0
Patent Text Reader

Abstract

The image decoding method includes the step of reconstructing the current image by performing block separation on the boundary of at least one reconstructed block among the reconstructed blocks, where the step of reconstructing the current image by performing block separation on the boundary of at least one reconstructed block among the reconstructed blocks includes the steps, when the prediction mode of at least one reconstructed mode among the blocks is set on both sides of the boundary of at least one reconstructed block is the combined inter-image / in-image prediction mode, determine that the value of the edge filter intensity applied to the boundary of at least one reconstructed block is a predetermined value and perform block separation on the boundary of at least one reconstructed block based on the determined value of the edge filter intensity.
Need to check novelty before this filing date? Find Prior Art

Description

Image encoding method and device, image decoding method and device

[0001] A method and device according to one embodiment can encode or decode an image using various types of encoding units, prediction units, or transformation units included in the image. A method and device according to one embodiment can encode or decode an image by generating a restoration block using a residual block and a prediction block, and performing deblocking filtering on the boundary of the restoration block.

[0002] With the development and widespread adoption of hardware capable of playing and storing high-resolution or high-definition video content, the need for codecs that effectively encode or decode such content is increasing. Encoded video content can be played back by decoding it. Recently, methods for effectively compressing such high-resolution or high-definition video content have been developed. For example, efficient video compression methods are being implemented that involve processing the video to be encoded in an arbitrary manner.

[0003] Various data units can be used to compress images, and there may be inclusion relationships between these data units. To determine the size of the data units used for image compression, these data units can be divided using various methods. Based on the characteristics of the image, an optimized data unit is determined, enabling image encoding or decoding.

[0004] An image decoding method according to one embodiment of the present disclosure comprises the steps of: determining a plurality of blocks in a current image by hierarchically dividing the current image based on a segmentation shape mode of the current image; generating prediction blocks of the blocks by performing prediction on the blocks; generating residual blocks of the blocks based on information about residuals of the blocks obtained from a bitstream; generating reconstructed blocks of the blocks using the prediction blocks of the blocks and the residual blocks of the blocks; And a step of performing deblocking filtering on the boundary of at least one block among the restoration blocks to restore the current image, and the step of performing deblocking filtering on the boundary of at least one restoration block among the restoration blocks to restore the current image comprises the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value when a prediction mode for at least one restoration block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of the boundary filtering strength.

[0005] The step of performing deblocking filtering on the boundary of the at least one restoration block based on the value of the determined boundary filtering strength may include, when the size of the at least one restoration block is 4xN or Nx4 (N is an integer greater than or equal to 4), determining the number of pixels in the at least one restoration block whose pixel value changes during deblocking filtering in units of rows or columns at the boundary in the vertical direction corresponding to the 4xN or the boundary in the horizontal direction corresponding to the Nx4 as 1.

[0006] At this time, the predetermined value may be 1 or 2.

[0007] The above predetermined value may be the same as a value of a boundary filtering strength used when the prediction mode for at least one block among the blocks located on both sides of the boundary of the at least one restoration block is an intra prediction mode.

[0008] The above predetermined value may be the same as the value of the boundary filtering strength used when the prediction mode of blocks located on both sides of the boundary of at least one restoration block is the inter prediction mode.

[0009] When the prediction mode for at least one block among the blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength is as follows:

[0010] When the size of at least one block among the blocks located on both sides of the boundary of the at least one restoration block is greater than or equal to a predetermined size, and the prediction mode for the at least one block is a combined inter-intra prediction mode, the value of the boundary filtering strength applied to the boundary of the at least one restoration block can be determined as a predetermined value.

[0011] When the prediction mode for at least one block among the blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength is as follows:

[0012] When the size of at least one block among the blocks located on both sides of the boundary of the at least one restoration block is smaller than or equal to a predetermined size, and the prediction mode for the at least one block is a combined inter-intra prediction mode, the value of the boundary filtering strength applied to the boundary of the at least one restoration block can be determined as a predetermined value.

[0013] At this time, the partitioning mode may be a mode based on a partitioning type including one of quad partitioning, binary partitioning, and tri partitioning.

[0014] According to one embodiment of the present disclosure, an image decoding device hierarchically divides the current image based on a segmentation form mode of the current image to determine a plurality of blocks in the current image, performs prediction on the blocks to generate prediction blocks of the blocks, generates residual blocks of the blocks based on information about residuals of the blocks obtained from a bitstream, generates reconstruction blocks for the blocks using the prediction blocks of the blocks and the residual blocks of the blocks, and performs deblocking filtering on a boundary of the at least one reconstruction block to restore the current image, wherein when the at least one processor performs deblocking filtering on a boundary of the at least one reconstruction block to restore the current image, if a prediction mode for at least one block among blocks located on both sides of the boundary of the at least one reconstruction block is a combined inter-intra prediction mode, the at least one processor determines a value of boundary filtering strength applied to the boundary of the at least one reconstruction block as a predetermined value, and determines a value of the determined boundary filtering strength. It is characterized by performing deblocking filtering on the boundary of at least one restoration block based on the value.

[0015] At this time, the predetermined value may be 1 or 2.

[0016] At this time, the predetermined value may be the same as the value of the boundary filtering strength used when the prediction mode for at least one block among the blocks located on both sides of the boundary of the at least one restoration block is the intra prediction mode.

[0017] Alternatively, the predetermined value may be the same as the value of the boundary filtering strength used when the prediction mode of blocks located on both sides of the boundary of the at least one restoration block is the inter prediction mode.

[0018] When the prediction mode of at least one processor is a combined inter-intra prediction mode for at least one block among blocks located on both sides of the boundary of the at least one restoration block, when determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength,

[0019] When the size of at least one block among the blocks located on both sides of the boundary of the at least one restoration block is greater than or equal to a predetermined size, and the prediction mode for the at least one block is a combined inter-intra prediction mode, the value of the boundary filtering strength applied to the boundary of the restoration block can be determined as a predetermined value.

[0020] When the at least one processor is a combined inter-intra prediction mode in which a prediction mode for at least one block among blocks located on both sides of the boundary of the restoration block is a combined inter-intra prediction mode, when determining a value of boundary filtering strength applied to the boundary of the restoration block as a predetermined value and performing deblocking filtering on the boundary of the restoration block based on the determined value of boundary filtering strength,

[0021] When the size of at least one block among the blocks located on both sides of the boundary of the above-mentioned restoration block is smaller than or equal to a predetermined size, and the prediction mode for the at least one block is a combined inter-intra prediction mode, the value of the boundary filtering strength applied to the boundary of the above-mentioned restoration block can be determined as a predetermined value.

[0022] An image encoding method according to one embodiment of the present disclosure

[0023] A step of hierarchically dividing the current image based on a segmentation form mode of the current image to determine a plurality of blocks within the image; A step of performing prediction on the blocks to generate predicted blocks of the blocks; A step of encoding residual blocks of the blocks based on the predicted blocks of the blocks and original blocks;

[0024] A step of generating restoration blocks for the blocks using the prediction blocks of the blocks and the encoded residual blocks; and a step of performing deblocking filtering on the boundary of at least one restoration block among the restoration blocks,

[0025] The step of performing deblocking filtering on the boundary of the at least one restoration block is characterized in that, when a prediction mode for at least one block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value, and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength.

[0026] According to one embodiment of the present disclosure, a video encoding device hierarchically divides a current image based on a segmentation shape mode of the current image to determine a plurality of blocks in the image, performs prediction on the blocks to generate prediction blocks of the blocks, encodes residual blocks of the blocks based on the prediction blocks of the blocks and original blocks, and generates reconstructed blocks for the blocks using the prediction blocks of the blocks and the encoded residual blocks; and performs deblocking filtering on a boundary of at least one reconstructed block among the reconstructed blocks.

[0027] When the at least one processor performs deblocking filtering on the boundary of the at least one restoration block, the at least one processor determines a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value when a prediction mode for at least one block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, and performs deblocking filtering on the boundary of the at least one restoration block based on the determined value of the boundary filtering strength.

[0028] A method for decoding an image according to one embodiment of the present disclosure

[0029] The method may include: determining a plurality of blocks in the current image by hierarchically dividing the current image based on available segmentation shape modes of blocks in the current image; generating prediction blocks of the blocks by performing prediction on the blocks; generating residual blocks of the blocks based on information about residuals of the blocks obtained from a bitstream; generating restoration blocks of the blocks using the prediction blocks of the blocks and the residual blocks of the blocks; and performing deblocking filtering on a boundary of at least one block among the restoration blocks based on a size or shape of at least one block among the plurality of blocks determined based on available segmentation shape modes of blocks in the current image to restore the current image.

[0030] According to one embodiment of the present disclosure, a video encoding method may include: determining a plurality of blocks in a current image by hierarchically partitioning the current image based on available partitioning shape modes of blocks in the current image; generating prediction blocks of the blocks by performing prediction on the blocks; encoding residual blocks of the blocks based on the prediction blocks of the blocks and original blocks; generating reconstructed blocks of the blocks using the prediction blocks of the blocks and the encoded residual blocks; and performing deblocking filtering on a boundary of at least one reconstructed block of the reconstructed blocks based on a size or shape of at least one block among the plurality of blocks determined based on the available partitioning shape modes of the blocks in the current image.

[0031] A computer program for an image decoding method according to one embodiment of the present disclosure can be recorded on a computer-readable recording medium.

[0032] FIG. 1a illustrates a block diagram of an image decoding device according to various embodiments.

[0033] FIG. 1b illustrates a flowchart of an image decoding method according to various embodiments.

[0034] FIG. 1c illustrates a flowchart of an image decoding method according to various embodiments.

[0035] FIG. 1d illustrates a block diagram of an image decoding unit according to various embodiments.

[0036] FIG. 2a illustrates a block diagram of an image encoding device according to various embodiments.

[0037] FIG. 2b illustrates a flowchart of an image encoding method according to various embodiments.

[0038] FIG. 2c illustrates a flowchart of an image encoding method according to various embodiments.

[0039] FIG. 2d illustrates a block diagram of an image encoding unit according to various embodiments.

[0040] FIG. 3 illustrates a process in which an image decoding device divides a current encoding unit to determine at least one encoding unit according to one embodiment.

[0041] FIG. 4 illustrates a process in which an image decoding device determines at least one encoding unit by dividing a non-square encoding unit according to one embodiment.

[0042] FIG. 5 illustrates a process in which an image decoding device divides an encoding unit based on at least one of block shape information and information about a division shape mode, according to one embodiment.

[0043] FIG. 6 illustrates a method for a video decoding device to determine a predetermined encoding unit among an odd number of encoding units according to one embodiment.

[0044] FIG. 7 illustrates the order in which multiple encoding units are processed when an image decoding device determines multiple encoding units by dividing a current encoding unit according to one embodiment.

[0045] FIG. 8 illustrates a process for determining that a current encoding unit is divided into an odd number of encoding units when the encoding units cannot be processed in a predetermined order, according to one embodiment.

[0046] FIG. 9 illustrates a process in which an image decoding device divides a first encoding unit to determine at least one encoding unit according to one embodiment.

[0047] FIG. 10 illustrates that, according to one embodiment, a video decoding device limits the shapes into which a second encoding unit can be divided when a non-square shape of a second encoding unit determined by dividing a first encoding unit satisfies a predetermined condition.

[0048] FIG. 11 illustrates a process of a video decoding device dividing a square-shaped encoding unit when information about a split shape mode cannot indicate that the encoding unit is divided into four square-shaped encoding units according to one embodiment.

[0049] FIG. 12 illustrates that, according to one embodiment, the processing order between multiple encoding units may vary depending on the process of dividing the encoding units.

[0050] FIG. 13 illustrates a process in which the depth of an encoding unit is determined as the shape and size of the encoding unit change when the encoding unit is recursively divided to determine a plurality of encoding units according to one embodiment.

[0051] FIG. 14 illustrates an index (part index, hereinafter referred to as PID) for depth and encoding unit distinction that can be determined according to the shape and size of encoding units according to one embodiment.

[0052] FIG. 15 illustrates that a plurality of encoding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment.

[0053] FIG. 16 illustrates a processing block that serves as a criterion for determining the order of determination of reference coding units included in a picture according to one embodiment.

[0054] FIGS. 17a to 17d are diagrams for explaining a process of performing deblocking filtering on the boundary of a restoration block according to various embodiments.

[0055] Figure 18 is a diagram for explaining a process of limiting the partitioning form mode of a block representing a trie partitioning type by considering the size of the unit performing deblocking filtering.

[0056] Figures 19a to 19b are diagrams for explaining a process of limiting the partitioning form mode of a binary partition type block by considering the size of the unit for deblocking filtering.

[0057] FIGS. 20A and 20B are diagrams for explaining a process for determining the number of pixels whose pixel values ​​are changed by deblocking filtering at a block boundary by considering the size of the block, according to various embodiments.

[0058] FIGS. 21A and 21B are diagrams for explaining a process for determining the number of pixels whose pixel values ​​are changed by deblocking filtering at a block boundary by considering the sizes of blocks bordering both sides of the block boundary, according to various embodiments.

[0059] FIG. 22 is a diagram for explaining a process of determining the number of pixels whose pixel values ​​are changed by deblocking filtering at a block boundary or the number of pixels referenced by considering the sizes of blocks bordering both sides of the block boundary, according to various embodiments.

[0060] FIGS. 23a and 23b are diagrams for explaining a process in which an image decoding device performs deblocking filtering on the boundary of a block of a conversion unit according to various embodiments.

[0061] FIGS. 24a to 24b are diagrams for explaining a process in which an image decoding device (100) performs deblocking filtering on blocks having a triangular partition shape according to various embodiments.

[0062] FIG. 25 is a diagram for explaining a process in which an image decoding device (100) performs bidirectional inter prediction on a block having a triangular partition according to one embodiment.

[0063] FIG. 26 is a table showing the values ​​of boundary filtering strength (Bs) and its determination conditions according to one embodiment.

[0064] An image decoding method according to one embodiment of the present disclosure comprises the steps of: determining a plurality of blocks in a current image by hierarchically dividing the current image based on a segmentation shape mode of the current image; generating prediction blocks of the blocks by performing prediction on the blocks; generating residual blocks of the blocks based on information about residuals of the blocks obtained from a bitstream; generating reconstructed blocks of the blocks using the prediction blocks of the blocks and the residual blocks of the blocks; And a step of performing deblocking filtering on the boundary of at least one block among the restoration blocks to restore the current image, and the step of performing deblocking filtering on the boundary of at least one restoration block among the restoration blocks to restore the current image comprises the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value when a prediction mode for at least one restoration block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of the boundary filtering strength.

[0065] According to one embodiment of the present disclosure, an image decoding device hierarchically divides the current image based on a segmentation form mode of the current image to determine a plurality of blocks in the current image, performs prediction on the blocks to generate prediction blocks of the blocks, generates residual blocks of the blocks based on information about residuals of the blocks obtained from a bitstream, generates reconstruction blocks for the blocks using the prediction blocks of the blocks and the residual blocks of the blocks, and performs deblocking filtering on a boundary of the at least one reconstruction block to restore the current image, wherein when the at least one processor performs deblocking filtering on a boundary of the at least one reconstruction block to restore the current image, if a prediction mode for at least one block among blocks located on both sides of the boundary of the at least one reconstruction block is a combined inter-intra prediction mode, the at least one processor determines a value of boundary filtering strength applied to the boundary of the at least one reconstruction block as a predetermined value, and determines a value of the determined boundary filtering strength. It is characterized by performing deblocking filtering on the boundary of at least one restoration block based on the value.

[0066] An image encoding method according to one embodiment of the present disclosure

[0067] A step of hierarchically dividing the current image based on a segmentation form mode of the current image to determine a plurality of blocks within the image; A step of performing prediction on the blocks to generate predicted blocks of the blocks; A step of encoding residual blocks of the blocks based on the predicted blocks of the blocks and original blocks;

[0068] A step of generating restoration blocks for the blocks using the prediction blocks of the blocks and the encoded residual blocks; and a step of performing deblocking filtering on the boundary of at least one restoration block among the restoration blocks,

[0069] The step of performing deblocking filtering on the boundary of the at least one restoration block is characterized in that, when a prediction mode for at least one block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value, and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength.

[0070] According to one embodiment of the present disclosure, a video encoding device hierarchically divides a current image based on a segmentation shape mode of the current image to determine a plurality of blocks in the image, performs prediction on the blocks to generate prediction blocks of the blocks, encodes residual blocks of the blocks based on the prediction blocks of the blocks and original blocks, and generates reconstructed blocks for the blocks using the prediction blocks of the blocks and the encoded residual blocks; and performs deblocking filtering on a boundary of at least one reconstructed block among the reconstructed blocks.

[0071] When the at least one processor performs deblocking filtering on the boundary of the at least one restoration block, the at least one processor determines a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value when a prediction mode for at least one block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, and performs deblocking filtering on the boundary of the at least one restoration block based on the determined value of the boundary filtering strength.

[0072] A method for decoding an image according to one embodiment of the present disclosure

[0073] The method may include: determining a plurality of blocks in the current image by hierarchically dividing the current image based on available segmentation shape modes of blocks in the current image; generating prediction blocks of the blocks by performing prediction on the blocks; generating residual blocks of the blocks based on information about residuals of the blocks obtained from a bitstream; generating restoration blocks of the blocks using the prediction blocks of the blocks and the residual blocks of the blocks; and performing deblocking filtering on a boundary of at least one block among the restoration blocks based on a size or shape of at least one block among the plurality of blocks determined based on available segmentation shape modes of blocks in the current image to restore the current image.

[0074] According to one embodiment of the present disclosure, a video encoding method may include: determining a plurality of blocks in a current image by hierarchically partitioning the current image based on available partitioning shape modes of blocks in the current image; generating prediction blocks of the blocks by performing prediction on the blocks; encoding residual blocks of the blocks based on the prediction blocks of the blocks and original blocks; generating reconstructed blocks of the blocks using the prediction blocks of the blocks and the encoded residual blocks; and performing deblocking filtering on a boundary of at least one reconstructed block of the reconstructed blocks based on a size or shape of at least one block among the plurality of blocks determined based on the available partitioning shape modes of the blocks in the current image.

[0075] A computer program for an image decoding method according to one embodiment of the present disclosure can be recorded on a computer-readable recording medium.

[0076] The advantages and features of the disclosed embodiments, and the methods for achieving them, will become clearer with reference to the embodiments described below, along with the accompanying drawings. However, the present disclosure is not limited to the embodiments disclosed below and may be implemented in various different forms. These embodiments are provided solely to ensure the completeness of the disclosure and to fully inform those skilled in the art of the present disclosure of the scope of the invention.

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

[0078] The terms used in this specification have been selected from widely used, current terms, taking into account the functions of the present disclosure. However, these terms may vary depending on the intentions of engineers working in the relevant fields, precedents, the emergence of new technologies, etc. Furthermore, in certain cases, terms may be arbitrarily selected by the applicant, and in such cases, their meanings will be described in detail in the relevant description of the invention. Therefore, the terms used in this disclosure should not be defined simply as names, but rather based on the meanings of the terms and the overall content of the present disclosure.

[0079] In this specification, singular expressions include plural expressions unless the context clearly specifies that they are singular.

[0080] When a part of a specification is said to "include" a component, this does not mean that it excludes other components, but rather that it may include other components, unless otherwise stated.

[0081] Also, the term "part" used in the specification means a software or hardware component, and the "part" performs certain functions. However, the "part" is not limited to software or hardware. The "part" may be configured to reside on an addressable storage medium and may be configured to execute one or more processors. Thus, by way of example, the "part" includes components such as software components, object-oriented software components, class components, and task components, as well as processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. The functionality provided within the components and "parts" may be combined into a smaller number of components and "parts" or further separated into additional components and "parts."

[0082] According to one embodiment of the present disclosure, a "unit" may be implemented as a processor and a memory. The term "processor" should be broadly interpreted to include a general-purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, and the like. In some circumstances, a "processor" may also refer to an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field-programmable gate array (FPGA), and the like. The term "processor" may also refer to a combination of processing devices, such as, for example, a combination of a DSP and a microprocessor, a combination of a plurality of microprocessors, a combination of one or more microprocessors in conjunction with a DSP core, or any other such configuration.

[0083] The term "memory" should be interpreted broadly to include any electronic component capable of storing electronic information. The term memory may also refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage, registers, etc. Memory is said to be in electronic communication with the processor if the processor can read information from the memory and / or write information to the memory. Memory integrated in a processor is in electronic communication with the processor.

[0084] Hereinafter, “image” may refer to a static image such as a still image of a video, or a dynamic image such as a moving image, i.e., the video itself.

[0085] Hereinafter, "sample" refers to data assigned to a sampling location in an image and is the subject of processing. For example, pixel values ​​in a spatial domain image or transformation coefficients in a transformation domain may be samples. A unit containing at least one such sample may be defined as a block.

[0086] Below, with reference to the attached drawings, embodiments are described in detail so that those skilled in the art can easily implement the present disclosure. Furthermore, in order to clearly illustrate the present disclosure in the drawings, parts irrelevant to the description are omitted.

[0087] Hereinafter, with reference to FIGS. 1 to 26, an image encoding apparatus and an image decoding apparatus, an image encoding method, and an image decoding method according to various embodiments are described. With reference to FIGS. 3 to 16, a method for determining a data unit of an image according to various embodiments is described, and with reference to FIGS. 1, 2, and 17 to 26, an image encoding apparatus, an image decoding apparatus, an image encoding method, and an image decoding method for performing deblocking filtering on the boundary of a restoration block of a data unit (encoding unit, prediction unit, or transformation unit) determined in various forms according to various embodiments are described.

[0088] Hereinafter, with reference to FIGS. 1 and 2, an encoding / decoding method and device for encoding or decoding an image based on various types of data units (encoding units, prediction units, or transformation units) according to one embodiment of the present disclosure are described.

[0089] FIG. 1a illustrates a block diagram of an image decoding device according to various embodiments.

[0090] An image decoding device (100) according to various embodiments may include a deblocking filtering unit (105) and an image decoding unit (110). The deblocking filtering unit (105) and the image decoding unit (110) may include at least one processor. In addition, the deblocking filtering unit (105) and the image decoding unit (110) may include a memory that stores commands to be performed by at least one processor. The image decoding unit (110) may be implemented as separate hardware from the deblocking filtering unit (105) or may include the deblocking filtering unit (105).

[0091] The image decoding unit (110) can hierarchically divide the current image based on the division shape mode of the current image to determine a plurality of blocks within the current image. That is, the image decoding unit (110) can hierarchically divide the current image based on the division shape mode of the blocks within the current image to determine a plurality of blocks within the current image. At this time, the block may be an encoding unit. However, the present invention is not limited thereto, and the block may be a transformation unit or a prediction unit. The division shape mode may be a mode based on at least one of a division direction and a division type of the block. The division type may indicate at least one of a binary split, a tri split, and a quad split.

[0092] The image decoding unit (110) can determine a plurality of blocks in the current image by hierarchically partitioning the current image based on available partitioning shape modes of blocks in the current image. The image decoding unit (110) can determine at least one second block based on one of the available partitioning shape modes of a first block in the current image. For example, if the partitioning shape mode indicates that the first block is not partitioned, the second block may be identical to the first block. If the partitioning shape mode indicates that the first block is partitioned into a plurality of blocks, a plurality of second blocks may be determined from the first block. In this case, the available partitioning shape mode may be a limited partitioning shape mode among all partitioning shape modes in consideration of deblocking filtering.

[0093] The image decoding unit (110) can perform prediction on blocks to generate prediction blocks of the blocks. For example, the image decoding unit (110) can perform inter prediction on at least one block to generate a prediction block of at least one block. The image decoding unit (110) can perform intra prediction on at least one block to generate a prediction block of at least one block. The image decoding unit (110) can perform prediction based on a combined inter-intra prediction mode on at least one block to generate a prediction block of at least one block. For example, the combined inter-intra prediction mode can be a mode that combines intra prediction and (merge index based) inter prediction. That is, the sample value of the prediction block generated based on the combined inter-intra prediction mode can be determined based on a weighted sum of the first sample value of the prediction block generated based on intra prediction and the second sample value of the prediction block generated based on inter prediction (based on merge index).

[0094] The image decoding unit (110) can perform prediction on partitions of at least one block to generate a prediction block of at least one block. At this time, the partitions are multiple units generated by dividing one block into various shapes, and can have various shapes such as triangles or squares.

[0095] The image decoding unit (110) can generate residual blocks of blocks based on information about the residual obtained from the bitstream.

[0096] The image decoding unit (110) can generate restoration blocks for blocks using the prediction blocks of the blocks and the residual blocks of the blocks. The image decoding unit (110) can generate restoration blocks of at least one block by combining the values ​​of the samples of the prediction block of at least one block and the values ​​of the samples of the residual block.

[0097] The deblocking filtering unit (105) can restore the current image by performing deblocking filtering on the boundary of at least one restoration block among the restoration blocks. The boundary of at least one restoration block is a boundary that separates two adjacent restoration blocks that include at least one restoration block, and two adjacent restoration blocks can be separated left and right or up and down based on the boundary.

[0098] The deblocking filtering unit (105) can determine the value of the boundary filtering strength applied to the boundary of at least one restoration block as a predetermined value when the prediction mode for at least one restoration block among the restoration blocks located on both sides of the boundary of at least one restoration block is a combined inter-intra prediction mode.

[0099] The deblocking filtering unit (105) can perform deblocking filtering on the boundary of at least one restoration block based on the determined boundary filtering strength value. The boundary filtering strength value can be determined as one of 0, 1, and 2 (but is not limited thereto and can have various values) calculated in units of 4 rows or 4 columns from the boundary (but is not limited thereto and can have various values).

[0100] That is, when filtering is performed on the vertical boundary of the restoration block in units of 8x8, the value of the boundary filtering strength can be determined in units of 4 rows. When filtering is performed on the vertical boundary, if the block located on the left side of the vertical boundary (if the value of the boundary filtering strength is calculated in units of 4 rows or 4 columns, it can be a block of 4x4 size, but is not limited thereto) is called a P block and the block located on the right side is called a Q block, the value of the boundary filtering strength can be determined as illustrated in FIG. 26.

[0101] FIG. 26 is a table showing the values ​​of boundary filtering strength (Bs) and its determination conditions according to one embodiment.

[0102] Specifically, if a P or Q block (i.e., at least one of the P or Q blocks) is encoded in an intra prediction mode, the value of the boundary filtering strength may be determined as 2. That is, deblocking filtering may be performed using a large boundary filtering value at the boundary of a block encoded in an intra prediction mode.

[0103] When the P and Q blocks are encoded in the inter prediction mode, the value of the boundary filtering strength can be determined as 0 or 1. If no discontinuity of pixel values ​​occurs in the P and Q blocks, the value of the boundary filtering strength can be determined as 0, and specifically, if this is not the case, the value of the boundary filtering strength can be determined as 1. The case in which no discontinuity of pixel values ​​occurs in the P and Q blocks may be when both the P and Q blocks are encoded in the inter prediction mode, there are no non-zero transform coefficients in both the P and Q blocks, and the two blocks have performed motion compensation at the same integer position. Therefore, the case in which a discontinuity occurs can be branched into the following multiple conditions, and if not, it can be determined as the case in which a discontinuity occurs.

[0104] Therefore, if the P and Q blocks are encoded in inter prediction mode and there is a non-zero transform coefficient value in the P or Q block, the value of the boundary filtering strength can be determined as 1.

[0105] If the P and Q blocks are encoded in inter prediction mode and there is a non-zero transform coefficient value in the P or Q block, the value of the boundary filtering strength can be determined as 1.

[0106] If the P and Q blocks are encoded in inter prediction mode, and there are no non-zero transform coefficient values ​​in the P and Q blocks, but the motion vectors of the P and Q blocks are different in integer units, the value of the boundary filtering strength can be determined as 1.

[0107] If the P and Q blocks are encoded in inter prediction mode, and there are no non-zero transform coefficient values ​​in the P and Q blocks, but the P and Q blocks have the same motion vector in integer units, but motion compensation is performed in different pictures or the number of motion vectors is different, the value of the boundary filtering strength may be determined as 1.

[0108] In other cases, that is, when the P and Q blocks are encoded in inter prediction mode and no discontinuity occurs in the pixel values ​​of the P or Q blocks, the value of the boundary filtering strength can be determined as 0.

[0109] The deblocking filtering unit (105) can perform deblocking filtering when the value of the boundary filtering strength is greater than 0. However, the deblocking filtering unit (105) does not perform filtering just because the value is greater than 0, but rather, based on the pixel values ​​within the block (for example, in the case of a horizontal boundary, based on the pixel values ​​located in the first and fourth columns, in the case of a vertical boundary, based on the pixel values ​​located in the first and fourth rows) determines the d value (which may mean the amount of change in pixel values ​​in areas on both sides of the boundary) and the β value determined based on the quantization parameters of the P and Q blocks, thereby determining whether to apply filtering. Here, the d and β values ​​may be the same as the d and β values ​​related to deblocking filtering defined in the HEVC (High Efficiency Video Coding) standard.

[0110] The deblocking filtering unit (105) can determine whether to apply strong filtering or weak filtering to the boundary of a block. For example, in the case of a vertical boundary, the deblocking filtering unit (105) can determine the strength of the filtering using the tc value determined based on the pixel values ​​of the first and fourth rows, the β value, and the boundary filtering strength value. That is, the deblocking filtering unit (105) can determine whether there is little change in pixel values ​​in each of the P block and the Q block but a discontinuity exists at the boundary using the pixel values ​​of the first and fourth rows, the β value, and the tc value, and can determine the strength of the filtering based on this. Here, the tc value is a value determined based on the value of the boundary filtering strength value, and may be identical to the tc value related to deblocking filtering defined in the HEVC (High Efficiency Video Coding) standard.

[0111] The deblocking filtering unit (105) can perform deblocking filtering on a row basis in the case of a vertical boundary. When the deblocking filtering unit (105) performs strong filtering on a vertical boundary, the deblocking filtering unit (105) can perform filtering based on the tc value and the pixel values ​​of each row in units of 3 pixels of the P block and 3 pixels of the Q block adjacent to the boundary of each row. The pixels whose pixel values ​​are changed by performing strong filtering may be 3 pixels of the P block and 3 pixels of the Q block adjacent to the boundary of each row, or the pixels referenced for performing strong filtering may be 4 pixels of the P block and 4 pixels of the Q block adjacent to the boundary of each row. That is, the number of pixels referenced for performing filtering and the number of pixels whose pixel values ​​are changed may be different, and preferably, the number of pixels referenced for performing filtering may be greater than or equal to the number of pixels whose pixel values ​​are changed. In particular, filtering may be performed with reference to pixel values ​​within the P block and pixel values ​​within the Q block, thereby changing pixel values ​​within the P block, and filtering may be performed with reference to pixel values ​​within the P block and pixel values ​​within the Q block, thereby changing pixel values ​​within the Q block.

[0112] When the deblocking filtering unit (105) performs weak filtering on a vertical boundary, the filtering can be performed based on the tc value in units of 2 pixels of the P block and 2 pixels of the Q block adjacent to the boundary of each row. The pixels whose pixel values ​​are changed by performing the filtering may be 2 pixels of the P block and 2 pixels of the Q block adjacent to the boundary of each row, or the pixels referenced for performing the filtering may be 4 pixels of the P block and 4 pixels of the Q block adjacent to the boundary of each row. That is, the number of pixels referenced for performing the filtering and the number of pixels whose values ​​are changed may be different, and preferably, the number of pixels referenced for performing the filtering may be greater than or equal to the number of pixels whose pixel values ​​are changed. Here, the referenced pixels refer to pixels used when determining a condition for whether to perform filtering on a pixel or when changing a pixel value by performing the filtering.

[0113] Accordingly, when the deblocking filtering unit (105) performs filtering (including strong filtering and weak filtering) on ​​the boundary of a restoration block of 8x8 units, it can refer to up to 4 pixels on each side of the boundary, and among them, the values ​​of up to 3 pixels on each side of the boundary can be changed.

[0114] However, those skilled in the art can easily understand that the number of pixels referenced and the number of pixels whose pixel values ​​are changed are not limited thereto and may have various numbers.

[0115] Meanwhile, the deblocking filtering unit (105) can determine the value of the boundary filtering strength to a predetermined value of 1 or 2 when the prediction mode for one of the blocks located on both sides of the boundary of at least one restoration block is an inter-intra prediction mode.

[0116] The given value may be the same as the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one restored block is the intra prediction mode.

[0117] For example, the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is an intra prediction mode may be 2, and therefore, the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is a combined inter-intra prediction mode may also be 2.

[0118] However, the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is an intra prediction mode may be a value other than 2, and in this case, the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is a combined inter-intra prediction mode may also be determined in the same manner.

[0119] Meanwhile, the predetermined value may be the same as the value of the boundary filtering strength used when the prediction modes for the blocks located on both sides of the boundary of at least one reconstructed block are all inter prediction modes. For example, the value of the boundary filtering strength used when the prediction modes for the blocks located on both sides of the boundary of at least one reconstructed block are inter prediction modes may be 0 or 1, and thus, the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is the combined inter-intra prediction mode may also be 0 or 1.

[0120] However, the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one restored block is an intra prediction mode may be a value other than 0 or 1, and in this case, the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one restored block is a combined inter-intra prediction mode may also be determined in the same manner.

[0121] The deblocking filtering unit (105) can determine the value of the boundary filtering strength applied to the boundary of at least one restoration block as a predetermined value (e.g., 1 or 2) when the size of at least one block among the blocks located on both sides of the boundary of at least one restoration block is greater than or equal to a predetermined size and the prediction mode for at least one block is a combined inter-intra prediction mode.

[0122] Alternatively, the deblocking filtering unit (105) may determine the value of the boundary filtering strength applied to the boundary of at least one restoration block as a predetermined value (e.g., 1 or 2) when the size of at least one block among the blocks located on both sides of the boundary of at least one restoration block is smaller than or equal to a predetermined size and the prediction mode for at least one block is a combined inter-intra prediction mode.

[0123] The deblocking filtering unit (105) can perform deblocking filtering based on a unit of a predetermined size. If the boundary of at least one restoration block is located on the boundary of a unit of a predetermined size, the deblocking filtering unit (105) can perform deblocking filtering on the boundary of at least one restoration block. For example, the predetermined size can be NxN (N can be an integer or 2 to the nth power, and in this case, n can be an integer), 4x4, or 8x8.

[0124] The image decoding unit (110) can limit the partition shape mode of the available first block based on the sizes or shapes of the plurality of blocks partitioned from the first block based on the partition shape mode of the available first block, and determine the plurality of blocks based on the limited partition shape mode. The deblocking filtering unit (105) can perform deblocking filtering on the boundary of the restoration block of at least one block among the plurality of blocks based on a unit of a predetermined size. That is, if the height or width of one of the plurality of blocks partitioned from the first block based on the partition shape mode of the available first block is not a multiple of the height or width indicated by the predetermined size, but is a smaller multiple of the height or width, the corresponding partition shape mode can be limited.

[0125] For example, if a given size is 8x8, the height or width represented by the given size is 8, and the partitioning shape mode of the first block of size 16x16 is a mode based on trie partitioning, the size of one of the plurality of blocks partitioned from the first block may be 8x4. In this case, since one of the height or width is 4, which is not a multiple of 8 but a value that is a multiple smaller than 8, the mode based on trie partitioning can be restricted for the first block.

[0126] Or, for example, if the height or width represented by a given size is 8, and the partitioning mode of the first block of size 8x16 or 8x8 is a mode based on binary partitioning, the sizes of the plurality of blocks partitioned from the first block may be 4x16 or 4x8.

[0127] At this time, since one of the height or width is 4, which is not a multiple of 8, and is a multiple smaller than 8, the mode based on binary division can be restricted for the first block.

[0128] Accordingly, in this case, if the deblocking filtering unit (105) performs deblocking filtering based on a predetermined size of 8x8, it is possible to perform deblocking filtering on the boundary of at least one block among the blocks in which the height and width of the divided blocks are not multiples of 4 but multiples of 8.

[0129] When the deblocking filtering unit (105) performs deblocking filtering in units of rows or columns based on units of a predetermined size, the number of pixels to which deblocking filtering is applied (i.e., the number of pixels whose pixel values ​​are changed by deblocking filtering) and the number of pixels referenced for deblocking filtering can be determined based on the sizes of two blocks located on both sides of the boundary of the block to which deblocking filtering is to be applied.

[0130] When the deblocking filtering unit (105) performs deblocking filtering in units of rows or columns based on units of 4x4 size, if the height or width of one of the two blocks located on both sides of the boundary of the block to which deblocking filtering is to be applied is 4, the number of pixels to which deblocking filtering is to be applied in each of the two blocks located on both sides may be determined to be 2 or less (including 0), and the maximum number of pixels to be referenced for deblocking filtering in each of the two blocks located on both sides may be determined to be 3 or less (for example, 2 or 1). For example, the deblocking filtering unit (105) may determine that among the blocks located on both sides of the boundary of a block to which deblocking filtering is to be applied in units of rows or columns at a vertical block boundary or a horizontal block boundary, the size of at least one block is 4xN or Nx4 (N is an integer greater than or equal to 4), the number of pixels to which deblocking filtering is to be applied in each of the two blocks located on both sides is 1, and the maximum number of pixels to be referenced for deblocking filtering in each of the two blocks located on both sides is 3.

[0131] When the deblocking filtering unit (105) performs deblocking filtering in units of rows or columns based on units of 4x4 size, if the height or width of one of the two blocks (the first block) located on both sides of the boundary of the block to which deblocking filtering is to be applied is 4 and the height or width of the remaining block (the second block) is 8, the maximum number of pixels referenced for deblocking filtering located in the first block can be determined as 2, and the number of pixels to which deblocking filtering is applied can be determined as 1, and the maximum number of pixels referenced for deblocking filtering located in the second block can be determined as 4, and the number of pixels to which deblocking filtering is applied can be determined as 3.

[0132] Alternatively, the deblocking filtering unit (105) may determine the maximum number of pixels referenced for deblocking filtering located in the first block to be 2 and the number of pixels to which deblocking filtering is applied to be 1, and may determine the maximum number of pixels referenced for deblocking filtering located in the second block to be 2 and the number of pixels to which deblocking filtering is applied to be 0.

[0133] The deblocking filtering unit (105) can perform deblocking filtering at the boundary of a restoration block regardless of the unit of a predetermined size. That is, the deblocking filtering unit (105) can perform deblocking filtering at the boundary of a restoration block even if the boundary of a unit of a predetermined size does not coincide with the boundary of the restoration block. Here, the restoration block may be one of a coding unit, a transformation unit, or a prediction unit.

[0134] The deblocking filtering unit (105) can determine whether to perform deblocking filtering using information about blocks on both sides of the boundary of the restoration block if residual information is not included in the blocks on both sides.

[0135] For example, the deblocking filtering unit (105) may determine to perform deblocking filtering when the motion vectors of both blocks are different based on the boundary portion of the restoration block.

[0136] The deblocking filtering unit (105) may determine to perform deblocking filtering when the mode of at least one block among the blocks located on both sides of the boundary of the reconstructed block is a specific mode. At this time, the specific mode may be an affine model-based motion compensation mode or a sub-block prediction mode. The affine model-based motion compensation mode refers to a mode in which motion compensation is performed using a motion model based on one of various affine motion models, such as a 4-parameter affine motion model or a 6-parameter affine motion model for motion compensation. The deblocking filtering unit (105) may determine to perform deblocking filtering when the intra prediction modes of the blocks located on both sides of the boundary of the reconstructed block are different from each other. The deblocking filtering unit (105) may determine to perform deblocking filtering when the parameters of the illumination compensation of the blocks located on both sides of the boundary of the reconstructed block are different from each other. Sub-block prediction mode may refer to a mode that performs prediction on a sub-block basis. The sub-block prediction mode may include a sub-block-based temporal merge mode or an affine model-based motion compensation mode.

[0137] The deblocking filtering unit (105) may determine to perform deblocking filtering when the prediction modes of blocks located on both sides of the boundary of the restoration block are different.

[0138] For example, if the prediction modes of blocks located on both sides of the boundary of the restored block are intra mode / inter mode, combined inter-intra prediction mode / inter mode, or combined inter-intra prediction mode / intra mode, it may be decided to perform deblocking filtering.

[0139] The deblocking filtering unit (105) can determine whether to perform deblocking filtering by considering the residuals of the blocks on both sides when one of the blocks located on both sides of the boundary of the restoration block has a triangular partition shape. The deblocking filtering unit (105) can determine whether to perform deblocking filtering by considering the height and width sizes of the blocks on both sides, and the maximum and minimum values ​​of the two values.

[0140] The deblocking filtering unit (105) can perform deblocking filtering on the boundary between triangular partitions when both blocks located on both sides have a triangular partition shape and when the height or width of at least one block among the blocks on both sides is greater than or less than a specific size.

[0141] The image decoding unit (110) can perform bidirectional inter prediction on the triangular partitions when the block has a triangular partition shape. At this time, the weights for the reference triangular partitions included in the two bidirectional reference blocks can be variously determined. For example, the weight of the first reference triangular partition of the first reference block may be 0, the weight of the second reference triangular partition of the first reference block may be 1, the weight of the first reference triangular partition of the second reference block may be 1, and the weight of the second reference triangular partition of the second reference block may be 0. Alternatively, the weight of the first reference triangular partition of the first reference block may be 1 / 4, the weight of the second reference triangular partition of the first reference block may be 3 / 4, the weight of the first reference triangular partition of the second reference block may be 3 / 4, and the weight of the second reference triangular partition of the second reference block may be 1 / 4. The weight of each reference triangular partition may be predetermined, but is not limited thereto, and the image decoding unit (110) may obtain the weight of each reference triangular partition from information about the weight included in the bitstream. At this time, the weight of the triangular partition may be determined as the weight of one of one or more weight candidates. At this time, index information indicating one of the one or more weight candidates may be obtained from the bitstream. The weight candidate may be determined for each block, but is not limited thereto, and may be determined for each reference block or for each reference triangular partition.

[0142] However, the block is not limited to having a triangular partition shape, and may have a partition mask shape including partitions of various shapes such as square. In this case, the shape of the partition mask of the block may be determined as one of one or more partition mask shape candidates. In this case, index information indicating one of the one or more mask shape candidates may be obtained from the bitstream.

[0143] FIG. 1b illustrates a flowchart of an image decoding method according to various embodiments.

[0144] In step S105, the image decoding device (100) can hierarchically divide the current image based on the segmentation form mode of the current image to determine a plurality of blocks within the current image.

[0145] In step S110, the image decoding device (100) can perform prediction on blocks to generate prediction blocks of the blocks.

[0146] In step S115, the image decoding device (100) can generate residual blocks of blocks based on information about the residual obtained from the bitstream.

[0147] At step S120, the image decoding device (100) can generate restoration blocks for the blocks using the prediction blocks of the blocks and the residual blocks of the blocks.

[0148] In step S125, the image decoding device (100) may perform deblocking filtering on the boundary of at least one block among the restoration blocks to restore the current image. At this time, if the prediction mode for at least one restoration block among the blocks located on both sides of the boundary of at least one restoration block is a combined inter-intra prediction mode, the image decoding device (100) may determine a value of boundary filtering strength applied to the boundary of at least one restoration block as a predetermined value, and perform deblocking filtering on the boundary of at least one restoration block based on the value of the boundary filtering strength.

[0149] FIG. 1c illustrates a flowchart of an image decoding method according to various embodiments.

[0150] In step S155, the image decoding device (100) can hierarchically segment the current image based on the available segmentation shape modes of the blocks in the current image to determine a plurality of blocks in the current image.

[0151] At step S160, the image decoding device (100) can perform prediction on a plurality of blocks to generate prediction blocks of the blocks.

[0152] In step S165, the image decoding device (100) can generate residual blocks of blocks based on information about the residual obtained from the bitstream.

[0153] At step S170, the image decoding device (100) can generate restoration blocks for the blocks using the prediction blocks of the blocks and the residual blocks of the blocks.

[0154] In step S175, the image decoding device (100) can perform deblocking filtering on the boundary of at least one block among the restored blocks based on the size or shape of at least one block among a plurality of blocks determined based on the available segmentation shape mode of blocks in the current image.

[0155] For example, the image decoding device (100) may generate a plurality of blocks divided from the current block based on one of the available partition shape modes of the current block, and, if one of the height and the width of one of the plurality of blocks is not a multiple of the height or the width indicated by a predetermined size, may not allow the available partition shape mode and may determine the plurality of blocks from the current block based on one of the other available partition shape modes. The image decoding device (100) may perform deblocking filtering on the boundary of at least one of the restoration blocks of the plurality of blocks determined based on the limited partition shape mode in units of a predetermined size.

[0156] Alternatively, the image decoding device (100) may perform deblocking filtering on the boundary of at least one restoration block or the boundary between triangular partitions based on the height or width of the at least one restoration block or based on residual information located on both sides of the boundary, when at least one restoration block among the restoration blocks of the plurality of blocks determined based on the available partitioning shape mode has a triangular partition shape.

[0157] FIG. 1d illustrates a block diagram of an image decoding unit (6000) according to various embodiments.

[0158] The image decoding unit (6000) according to various embodiments performs tasks performed in encoding image data in the image decoding unit (110) of the image decoding device (100).

[0159] Referring to FIG. 1D, the entropy decoding unit (6150) parses encoded image data to be decoded and encoding information required for decoding from the bitstream (6050). The encoded image data is a quantized transform coefficient, and the inverse quantization unit (6200) and the inverse transform unit (6250) restore residue data from the quantized transform coefficient.

[0160] The intra prediction unit (6400) performs intra prediction for each block. The inter prediction unit (6350) performs inter prediction for each block using the reference image obtained from the restoration picture buffer (6300). By adding the prediction data and the residue data for each block generated by the intra prediction unit (6400) or the inter prediction unit (6350), the spatial domain data for the block of the current image included in the bitstream (6050) is restored, and the deblocking unit (6450) and the SAO performing unit (6500) can perform loop filtering on the restored spatial domain data to output a filtered restoration image (6600). In addition, the restoration images stored in the restoration picture buffer (6300) can be output as reference images. The deblocking filtering unit (105) can include the deblocking unit (6450) of the image decoding unit (6000).

[0161] In order to decrypt image data in an image decryption device (100), step-by-step operations of an image decryption unit (6000) according to various embodiments may be performed block by block.

[0162] FIG. 2a illustrates a block diagram of an image encoding device according to various embodiments.

[0163] An image encoding device (200) according to various embodiments may include a deblocking filtering unit (205) and an image encoding unit (210).

[0164] The deblocking filtering unit (205) and the image encoding unit (210) may include at least one processor. In addition, the deblocking filtering unit (205) and the image encoding unit (210) may include a memory that stores instructions to be performed by at least one processor. The image encoding unit (210) may be implemented as separate hardware from the deblocking filtering unit (205) or may include the deblocking filtering unit (205).

[0165] The image encoding unit (210) can hierarchically divide the current image based on the division shape mode of the current image to determine a plurality of blocks within the current image. That is, the image encoding unit (210) can hierarchically divide the current image based on the division shape mode of the blocks within the current image to determine a plurality of blocks within the current image. At this time, the block may be an encoding unit. However, the present invention is not limited thereto, and the block may be a transformation unit or a prediction unit. The division shape mode may be a mode based on at least one of a division direction and a division type of the block. The division type may indicate at least one of a binary split, a tri split, and a quad split.

[0166] The image encoding unit (210) can determine a plurality of blocks in the current image by hierarchically partitioning the current image based on available partitioning shape modes of blocks in the current image. The image encoding unit (210) can determine at least one second block based on one of the available partitioning shape modes of a first block in the current image. For example, if the partitioning shape mode indicates that the first block is not partitioned, the second block may be identical to the first block. If the partitioning shape mode indicates that the first block is partitioned into a plurality of blocks, a plurality of second blocks may be determined. In this case, the available partitioning shape mode may be a limited partitioning shape mode among all partitioning shape modes in consideration of deblocking filtering.

[0167] The image encoding unit (210) can perform prediction on blocks to generate prediction blocks of the blocks. The image encoding unit (210) can perform inter prediction on at least one block to generate a prediction block of at least one block. The image encoding unit (210) can perform intra prediction on at least one block to generate a prediction block of at least one block. The image encoding unit (210) can perform prediction based on a combined inter-intra prediction mode on at least one block to generate a prediction block of at least one block. The image encoding unit (210) can perform prediction on partitions of at least one block to generate prediction blocks of at least one block. At this time, the partitions are a plurality of units generated by dividing one block into various shapes, and can have various shapes such as triangles or squares.

[0168] The image encoding unit (210) can encode residual blocks of blocks based on predicted blocks of blocks and original blocks.

[0169] The image encoding unit (210) can generate restoration blocks for blocks using prediction blocks of blocks and residual blocks of blocks. The image encoding unit (210) can generate sample values ​​of restoration blocks of at least one block by combining the sample values ​​of prediction blocks of at least one block and the sample values ​​of residual blocks.

[0170] The deblocking filtering unit (205) can restore the current image by performing deblocking filtering on the boundary of at least one restoration block among the restoration blocks. The boundary of at least one block is a boundary that separates two adjacent blocks containing at least one block, and two adjacent blocks can be separated left and right or up and down based on the boundary.

[0171] The deblocking filtering unit (205) may determine a value of boundary filtering strength applied to the boundary of at least one restoration block as a predetermined value when the prediction mode for at least one restoration block among blocks located on both sides of the boundary of at least one restoration block is a combined inter-intra prediction mode. The deblocking filtering unit (205) may perform deblocking filtering on the boundary of at least one restoration block based on the value of the boundary filtering strength. Specifically, when the P or Q block is encoded in the intra prediction mode, the value of the boundary filtering strength may be determined as 2. That is, deblocking filtering may be performed using a large boundary filtering value at the boundary of a block encoded in the intra prediction mode. The deblocking filtering unit (205) may perform filtering when the value of the boundary filtering strength is greater than 0. However, the deblocking filtering unit (205) does not always perform filtering even if the value is greater than 0, but rather, based on the pixel values ​​within the block (for example, based on the pixel values ​​located in the first and fourth columns in the case of a horizontal boundary), the d value (which may mean the amount of change in pixel values ​​in areas on both sides of the boundary) is determined and the β value is determined based on the quantization parameters of the P and Q blocks, thereby re-determining whether to apply filtering. Here, the d and β values ​​may be the same as the d and β values ​​related to deblocking filtering defined in HEVC (High Efficiency Video Coding).

[0172] The deblocking filtering unit (205) can determine whether to apply strong filtering or weak filtering to the boundary of a block. For example, in the case of a vertical boundary, the deblocking filtering unit (205) can determine the strength of filtering using the pixel values ​​of the first and fourth rows and the β value and the tc value. That is, the deblocking filtering unit (105) can determine whether there is little change in pixel values ​​in each of the P block and the Q block but a discontinuity exists at the boundary using the pixel values ​​of the first and fourth rows and the β value and the tc value, and can determine the strength of filtering based on this. Here, the tc value may be the same as the tc value related to deblocking filtering defined in HEVC (High Efficiency Video Coding).

[0173] The deblocking filtering unit (205) can perform deblocking filtering on a row basis in the case of a vertical boundary. When the deblocking filtering unit (105) performs strong filtering on a vertical boundary, the filtering unit can perform filtering based on the tc value and the pixel values ​​of each row in units of 3 pixels of the P block and 3 pixels of the Q block adjacent to the boundary of each row. The pixels whose pixel values ​​are changed by performing filtering may be 3 pixels of the P block and 3 pixels of the Q block adjacent to the boundary of each row, or the pixels referenced for performing filtering may be 4 pixels of the P block and 4 pixels of the Q block adjacent to the boundary of each row. That is, the number of pixels referenced for performing filtering and the number of pixels whose pixel values ​​are changed may be different, and preferably, the number of pixels referenced for performing filtering may be greater than or equal to the number of pixels whose pixel values ​​are changed. In particular, filtering may be performed using pixel values ​​within the P block and pixel values ​​within the Q block to change pixel values ​​within the P block, and filtering may be performed using pixel values ​​within the P block and pixel values ​​within the Q block to change pixel values ​​within the Q block.

[0174] When the deblocking filtering unit (205) performs deblocking filtering on a vertical boundary, the filtering can be performed based on the tc value in units of 2 pixels of the P block and 2 pixels of the Q block adjacent to the boundary of each row. The pixels whose pixel values ​​are changed by performing the filtering may be 2 pixels of the P block and 2 pixels of the Q block adjacent to the boundary of each row, or the pixels referenced for performing the filtering may be 4 pixels of the P block and 4 pixels of the Q block adjacent to the boundary of each row. That is, the number of pixels referenced for performing the filtering and the number of pixels whose pixel values ​​are changed may be different, and preferably, the number of pixels referenced for performing the filtering may be greater than or equal to the number of pixels whose pixel values ​​are changed. Here, the referenced pixels refer to pixels used when determining a condition for whether to perform filtering on a pixel or when changing a pixel value by performing the filtering.

[0175] Accordingly, when the deblocking filtering unit (205) performs deblocking filtering based on 8x8 units, it can reference up to 4 pixels on each side of the boundary, and among them, up to 3 pixel values ​​on each side of the boundary can be changed. However, those skilled in the art can easily understand that the number of pixels referenced and the number of pixels whose pixel values ​​are changed are not limited thereto and can have various numbers.

[0176] The deblocking filtering unit (205) may determine a value of the boundary filtering strength to be a predetermined value of 1 or 2 when the prediction mode for one of the blocks located on both sides of the boundary of at least one restoration block is a combined inter-intra prediction mode. The predetermined value may be the same value as the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one restoration block is an intra prediction mode.

[0177] For example, when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is an intra prediction mode, the value of the boundary filtering strength used may be 2, and thus, when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is a combined inter-intra prediction mode, the value of the boundary filtering strength used may also be 2. However, when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is an intra prediction mode, the value of the boundary filtering strength used may be a value other than 2, and in this case, the value of the boundary filtering strength used may also be determined in the same manner when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is a combined inter-intra prediction mode.

[0178] Meanwhile, the predetermined value may be the same as the value of the boundary filtering strength used when the prediction modes for the blocks located on both sides of the boundary of at least one reconstructed block are both the inter prediction mode. For example, the value of the boundary filtering strength used when the prediction modes for the blocks located on both sides of the boundary of at least one reconstructed block are the inter prediction mode may be 0 or 1, and thus, the value of the boundary filtering strength used when the prediction modes for one of the blocks located on both sides of the boundary of at least one reconstructed block are the combined inter-intra prediction mode may also be 0 or 1. However, the value of the boundary filtering strength used when the prediction mode for one of the blocks located on both sides of the boundary of at least one reconstructed block is the intra prediction mode may be a value other than 0 or 1, and in this case, the value of the boundary filtering strength used when the prediction modes for one of the blocks located on both sides of the boundary of at least one reconstructed block are the combined inter-intra prediction mode may also be determined in the same manner.

[0179] The deblocking filtering unit (205) can determine a value to be applied to the boundary of at least one restoration block as a predetermined value when the size of at least one block among the blocks located on both sides of the boundary of at least one restoration block is greater than or equal to a predetermined size and the prediction mode for at least one block is a combined inter-intra prediction mode.

[0180] Alternatively, the deblocking filtering unit (205) may determine a value of a boundary filtering strength applied to the boundary of at least one restoration block as a predetermined value when the size of at least one block among the blocks located on both sides of the boundary of at least one restoration block is smaller than or equal to a predetermined size and the prediction mode for at least one block is a combined inter-intra prediction mode.

[0181] The deblocking filtering unit (205) can determine the value of the boundary filtering strength applied to the boundary of at least one restoration block as a predetermined value when the size of at least one block among the blocks located on both sides of the boundary of at least one restoration block is greater than or equal to a predetermined size and the prediction mode for at least one block is a combined inter-intra prediction mode.

[0182] The deblocking filtering unit (205) can perform deblocking filtering based on a unit of a predetermined size. If the boundary of at least one restoration block is located on the boundary of a unit of the predetermined size, the deblocking filtering unit (205) can perform deblocking filtering on the boundary of at least one restoration block. For example, the predetermined size can be NxN (N can be an integer or 2 to the nth power, and in this case, n can be an integer), 4x4, or 8x8.

[0183] The image encoding unit (210) may limit the partition shape mode of the first block available based on the sizes or shapes of the plurality of blocks partitioned from the first block based on the partition shape mode of the first block available, determine the plurality of blocks based on the limited partition shape mode, and perform deblocking filtering on the boundary of the restoration block of at least one block among the plurality of blocks based on a unit of a predetermined size. That is, if the height or width of one of the plurality of blocks partitioned from the first block based on the partition shape mode of the first block available is not a multiple of the height or width indicated by the predetermined size, but is a multiple of the height or width having a smaller value than the height or width indicated by the predetermined size, the corresponding partition shape mode may be limited.

[0184] Accordingly, in this case, if the deblocking filtering unit (205) performs deblocking filtering based on a unit of a predetermined size of 8x8, it is possible to perform deblocking filtering on the boundary of at least one block among the blocks in which the height and width of the divided blocks are not multiples of 4 but multiples of 8.

[0185] When the deblocking filtering unit (205) performs deblocking filtering based on the size of a predetermined block, the number of pixels to which deblocking filtering is applied and the number of pixels referenced for deblocking filtering can be determined based on the sizes of two blocks located on both sides of the boundary of the block to which deblocking filtering is to be applied.

[0186] When the deblocking filtering unit (205) performs deblocking filtering in units of rows or columns based on 4x4 units, if the height or width of one of the two blocks located on both sides of the boundary of the block to which deblocking filtering is to be applied is 4, the number of pixels to which deblocking filtering is to be applied in each of the two blocks located on both sides may be determined to be 2 or less (including 0), and the maximum number of pixels to be referenced for deblocking filtering in each of the two blocks located on both sides may be determined to be 3 or less (for example, 2 or 1). For example, the deblocking filtering unit (205) may determine that among the blocks located on both sides of the boundary of a block to which deblocking filtering is to be applied in units of rows or columns at a vertical block boundary or a horizontal block boundary, the size of at least one block is 4xN or Nx4 (N is an integer greater than or equal to 4), the number of pixels to which deblocking filtering is to be applied in each of the two blocks located on both sides is 1, and the maximum number of pixels to be referenced for deblocking filtering in each of the two blocks located on both sides is 3.

[0187] When the deblocking filtering unit (205) performs deblocking filtering in units of rows or columns based on 4x4 units, if the height or width of one of the two blocks (the first block) located on both sides of the boundary of the block to which deblocking filtering is to be applied is 4 and the height or width of the remaining block (the second block) is 8, the maximum number of pixels referenced for deblocking filtering located in the first block can be determined as 2, and the number of pixels to which deblocking filtering is applied can be determined as 1, and the maximum number of pixels referenced for deblocking filtering located in the second block can be determined as 4, and the number of pixels to which deblocking filtering is applied can be determined as 3.

[0188] Alternatively, the deblocking filtering unit (205) may determine the maximum number of pixels referenced for deblocking filtering located in the first block to be 2 and the number of pixels to which deblocking filtering is applied to be 1, and may determine the maximum number of pixels referenced for deblocking filtering located in the second block to be 2 and the number of pixels to which deblocking filtering is applied to be 0.

[0189] The deblocking filtering unit (205) can perform deblocking filtering at the boundary of a restoration block regardless of the unit of a predetermined size. That is, the deblocking filtering unit (205) can perform deblocking filtering at the boundary of a restoration block even if the boundary of a unit of a predetermined size does not match the boundary of the restoration block. Here, the restoration block may be one of a coding unit, a transformation unit, or a prediction unit.

[0190] The deblocking filtering unit (205) can determine whether to perform deblocking filtering using information about blocks on both sides of the boundary of the restoration block if residual information is not included in the blocks on both sides.

[0191] For example, the deblocking filtering unit (205) may determine to perform deblocking filtering when the motion vectors of both blocks are different based on the boundary portion of the restoration block.

[0192] The deblocking filtering unit (205) may determine to perform deblocking filtering if the mode of at least one block among the blocks located on both sides of the boundary of the restored block is a specific mode. At this time, the specific mode may be an affine model-based motion compensation mode or a sub-block prediction mode.

[0193] The deblocking filtering unit (205) may determine to perform deblocking filtering when the intra prediction modes of blocks located on both sides of the boundary of the restoration block are different from each other. The deblocking filtering unit (205) may determine to perform deblocking filtering when the parameters of the illumination compensation of blocks located on both sides of the boundary of the restoration block are different from each other.

[0194] The deblocking filtering unit (205) may determine to perform deblocking filtering when the prediction modes of blocks located on both sides of the boundary of the restoration block are different.

[0195] For example, if the prediction modes of blocks located on both sides of the boundary of the restored block are intra mode / inter mode, combined inter-intra prediction mode / inter mode, or combined inter-intra prediction mode / intra mode, it may be decided to perform deblocking filtering.

[0196] The deblocking filtering unit (205) can determine whether to perform deblocking filtering by considering the residuals of both blocks when one of the blocks located on either side of the boundary of the restoration block has a triangular partition shape. The deblocking filtering unit (105) can determine whether to perform deblocking filtering by considering the height and width sizes of both blocks, and the maximum and minimum values ​​of the two values.

[0197] The deblocking filtering unit (205) can perform deblocking filtering on the boundary between triangular partitions when both blocks located on both sides have a triangular partition shape and when the height or width of at least one block among the blocks on both sides is greater than or less than a specific size.

[0198] The image encoding unit (210) can perform bidirectional inter prediction on the triangular partitions when the block has a triangular partition shape. At this time, the weights for the reference triangular partitions included in the two bidirectional reference blocks can be variously determined. For example, the weight of the first reference triangular partition of the first reference block may be 0, the weight of the second reference triangular partition of the first reference block may be 1, the weight of the first reference triangular partition of the second reference block may be 1, and the weight of the second reference triangular partition of the second reference block may be 0. Alternatively, the weight of the first reference triangular partition of the first reference block may be 1 / 4, the weight of the second reference triangular partition of the first reference block may be 3 / 4, the weight of the first reference triangular partition of the second reference block may be 3 / 4, and the weight of the second reference triangular partition of the second reference block may be 1 / 4. The weight of each reference triangular partition may be predetermined, but is not limited thereto, and the image encoding unit (210) may generate a bitstream including information about the weight based on the weight of the reference triangular partition. At this time, the weight of the triangular partition may be determined as the weight of one of one or more weight candidates. At this time, a bitstream including index information indicating one of the one or more weight candidates may be generated. The weight candidate may be determined for each block, but is not limited thereto, and may be determined for each reference block or for each reference triangular partition.

[0199] However, the block is not limited to having a triangular partition shape, and may have a partition mask shape including partitions of various shapes such as square. In this case, the shape of the partition mask of the block may be determined as one of one or more partition mask shape candidates. In this case, a bitstream including index information indicating one of the one or more mask shape candidates may be generated.

[0200] FIG. 2b illustrates a flowchart of an image encoding method according to various embodiments.

[0201] In step S205, the image encoding device (200) can hierarchically divide the current image based on the segmentation form mode of the current image to determine a plurality of blocks within the image.

[0202] In step S210, the image encoding device (200) can perform prediction on blocks to generate prediction blocks of the blocks.

[0203] In step S215, the image encoding device (200) can encode residual blocks of blocks based on predicted blocks of blocks and original blocks.

[0204] In step S220, the image encoding device (200) can generate restoration blocks for the blocks using the prediction blocks and encoded residual blocks of the blocks.

[0205] In step S225, the video encoding device (200) may perform deblocking filtering on the boundary of at least one of the restoration blocks. At this time, if the prediction mode for at least one restoration block among the blocks located on both sides of the boundary of at least one restoration block is a combined inter-intra prediction mode, the video encoding device (200) may determine a value of boundary filtering strength applied to the boundary of at least one restoration block as a predetermined value, and perform deblocking filtering on the boundary of at least one restoration block based on the value of the boundary filtering strength.

[0206] FIG. 2c illustrates a flowchart of an image encoding method according to various embodiments.

[0207] In step S255, the image encoding device (200) can hierarchically divide the current image based on the available division shape modes of the blocks in the current image to determine a plurality of blocks in the current image.

[0208] At step S260, the image encoding device (200) can perform prediction on blocks to generate prediction blocks of the blocks.

[0209] In step S265, the video encoding device (200) can encode residual blocks of blocks based on predicted blocks of blocks and original blocks.

[0210] In step S270, the image encoding device (200) can generate restoration blocks for the blocks using the prediction blocks and encoded residual blocks of the blocks.

[0211] In step S275, the image encoding device (200) can perform deblocking filtering on the boundary of at least one restoration block among the restoration blocks based on the size or shape of at least one block among the plurality of blocks determined based on the available segmentation shape mode of the blocks in the current image.

[0212] For example, the video encoding device (200) may generate a plurality of blocks divided from the current block based on one of the available partition shape modes of the current block, and, if one of the height and the width of one of the plurality of blocks is not a multiple of the height or the width indicated by a predetermined size, may not allow the available partition shape mode and determine the plurality of blocks from the current block based on one of the other available partition shape modes. The video encoding device (200) may perform deblocking filtering on the boundary of at least one of the restored blocks of the plurality of blocks determined based on the limited partition shape mode.

[0213] For example, the video encoding device (200) may generate a plurality of blocks divided from the current block based on one of the available partition shape modes of the current block, and, if one of the height and the width of one of the plurality of blocks is not a multiple of the height or the width indicated by a predetermined size, may not allow the available partition shape mode and determine the plurality of blocks from the current block based on one of the other available partition shape modes. The video encoding device (200) may perform deblocking filtering on the boundary of at least one of the restored blocks of the plurality of blocks determined based on the limited partition shape mode.

[0214] Alternatively, the video encoding device (200) may perform deblocking filtering on the boundary between triangular partitions based on the height or width of at least one of the restoration blocks of the plurality of blocks determined based on the available partitioning shape mode, or based on residual information located on both sides of the boundary, when the shape of at least one restoration block has a triangular partition shape.

[0215] FIG. 2d illustrates a block diagram of an image encoding unit according to various embodiments.

[0216] The video encoding unit (7000) according to various embodiments performs tasks performed by the video encoding unit (210) of the video encoding device (200) to encode video data.

[0217] That is, the intra prediction unit (7200) performs intra prediction for each block in the current image (7050), and the inter prediction unit (7200) performs inter prediction for each block using the current image (7050) and a reference image obtained from the restored picture buffer (7100).

[0218] Residue data is generated by subtracting prediction data for each block output from the intra prediction unit (7200) or the inter prediction unit (7200) from data for a block to be encoded in the current image (7050), and the transformation unit (7250) and the quantization unit (7300) can perform transformation and quantization on the residue data to output quantized transformation coefficients for each block. The inverse quantization unit (7450) and the inverse transformation unit (7500) can perform inverse quantization and inverse transformation on the quantized transformation coefficients to restore the residue data in the spatial domain. The restored residue data in the spatial domain is restored as data in the spatial domain for the block of the current image (7050) by adding it to the prediction data for each block output from the intra prediction unit (7200) or the inter prediction unit (7200). The deblocking unit (7550) and the SAO performing unit perform in-loop filtering on data of the restored spatial domain to generate a filtered restored image. The deblocking filtering unit (105) may include the deblocking unit (6450) of the image decoding unit (6000). The generated restored image is stored in the restored picture buffer (7100). The restored images stored in the restored picture buffer (7100) can be used as reference images for inter-prediction of other images. The entropy encoding unit (7350) performs entropy encoding on quantized transform coefficients, and the entropy-encoded coefficients can be output as a bitstream (7400).

[0219] In order for the video encoding unit (7000) according to various embodiments to be applied to the video encoding device (200), the step-by-step operations of the video encoding unit (7000) according to various embodiments can be performed block by block.

[0220] Below, the division of encoding units according to one embodiment of the present disclosure is described in detail.

[0221] An image may be split 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, but is not limited thereto. In addition, the maximum coding unit may be hierarchically split into coding units based on information about a split shape mode obtained from the bitstream. Information about the split shape mode may include at least one of information indicating whether to split, split direction information, and split type information. The information indicating whether to split indicates whether to split the coding unit. The split direction information indicates splitting in one of a horizontal direction and a vertical direction. The split type information indicates that the coding unit is split into one of a binary split, a tri split (or a triple split), or a quad split.

[0222] For convenience of explanation, the present disclosure describes information about the split shape mode by dividing it into information indicating whether to split, split direction information, and split type information, but is not limited thereto. The image decoding device (100) can obtain information about the split shape mode from a bitstream as a single empty string. The image decoding device (100) can determine whether to split an encoding unit, the split direction, and the split type based on the single empty string.

[0223] The coding unit may be smaller than or equal to the maximum coding unit. For example, if information about the partition shape mode indicates that it is not partitioned, the coding unit has the same size as the maximum coding unit. If information about the partition shape mode indicates that it is partitioned, the maximum coding unit may be partitioned into coding units of a lower depth. Furthermore, if information about the partition shape mode for a coding unit of a lower depth indicates partitioning, the coding unit of the lower depth may be partitioned into coding units of a smaller size. However, the partitioning of the image is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished. The partitioning of the coding unit is described in more detail with reference to FIGS. 3 to 16.

[0224] In addition, a coding unit can be split into prediction units for predicting an image. The prediction unit can be equal to or smaller than the coding unit. In addition, a coding unit can be split into transformation units for transforming an image. The transformation unit can be equal to or smaller than the coding unit. The shape and size of the transformation unit and the prediction unit may be unrelated to each other. The coding unit may be distinguished from the prediction unit and the transformation unit, but the coding unit, the prediction unit, and the transformation unit may be identical to each other. Splitting of the prediction unit and the transformation unit can be performed in the same manner as splitting of the coding unit. Splitting of the coding unit is described in more detail with reference to FIGS. 3 to 16. The current block and the neighboring blocks of the present disclosure may represent one of a maximum coding unit, a coding unit, a prediction unit, and a transformation unit. In addition, the current block or the current coding unit is a block currently being decoded or encoded or a block currently being split. The neighboring block may be a reconstructed block before the current block. The neighboring block may be spatially or temporally adjacent to the current block. The surrounding blocks can be located on the lower left, left, upper left, upper right, right, or lower right of the current block.

[0225] FIG. 3 illustrates a process in which an image decoding device (100) divides a current encoding unit to determine at least one encoding unit according to one embodiment.

[0226] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, or Nx4N, where N may be a positive integer. The block shape information is information indicating at least one of the shape, direction, width, and height ratio or size of the encoding unit.

[0227] The shape of the encoding unit may include square and non-square. When the width and height of the encoding unit are equal (i.e., when the block shape of the encoding unit is 4Nx4N), the image decoding device (100) may determine the block shape information of the encoding unit as square. The image decoding device (100) may determine the shape of the encoding unit as non-square.

[0228] When the width and height of the encoding unit are different (i.e., when the block shape of the encoding unit is 4Nx2N, 2Nx4N, 4NxN, or Nx4N), the image decoding device (100) may determine the block shape information of the encoding unit to be non-square. When the shape of the encoding unit is non-square, the image decoding device (100) may determine the ratio of the width and height among the block shape information of the encoding unit to be at least one of 1:2, 2:1, 1:4, 4:1, 1:8, or 8:1. In addition, based on the width length and the height length of the encoding unit, the image decoding device (100) may determine whether the encoding unit is horizontal or vertical. In addition, based on at least one of the width length, the height length, or the area of ​​the encoding unit, the image decoding device (100) may determine the size of the encoding unit.

[0229] According to one embodiment, the image decoding device (100) can determine the shape of an encoding unit using block shape information, and can determine the shape into which the encoding unit is divided using information about the split shape mode. That is, the splitting method of the encoding unit indicated by the information about the split shape mode can be determined depending on which block shape the block shape information used by the image decoding device (100) indicates.

[0230] The image decoding device (100) can obtain information about the partition shape mode from the bitstream. However, the present invention is not limited thereto, and the image decoding device (100) and the image encoding device (200) can obtain information about a partition shape mode that has been agreed upon in advance based on block shape information. The image decoding device (100) can obtain information about a partition shape mode that has been agreed upon in advance for a maximum coding unit or a minimum coding unit. For example, the image decoding device (100) can determine information about a partition shape mode for a maximum coding unit as quad split. Additionally, the image decoding device (100) can determine information about a partition shape mode for a minimum coding unit as “not split.” Specifically, the image decoding device (100) can determine the size of the maximum coding unit as 256x256. The image decoding device (100) can determine information about a partition shape mode that has been agreed upon in advance as quad split. Quad splitting is a splitting shape mode that divides both the width and height of an encoding unit in half. Based on information about the splitting shape mode, the image decoding device (100) can obtain a coding unit of size 128x128 from a maximum coding unit of size 256x256. In addition, the image decoding device (100) can determine the size of the minimum coding unit as 4x4. The image decoding device (100) can obtain information about the splitting shape mode that indicates "not splitting" for the minimum coding unit.

[0231] According to one embodiment, the image decoding device (100) may use block shape information indicating that the current encoding unit is square in shape. For example, the image decoding device (100) may determine whether to not split a square encoding unit, split it vertically, split it horizontally, split it into four encoding units, etc., based on information about the split shape mode. Referring to FIG. 3, when the block shape information of the current encoding unit (300) indicates a square shape, the decoding unit (120) may not split an encoding unit (310a) having the same size as the current encoding unit (300) based on information about the split shape mode indicating that it is not split, or may determine a split encoding unit (310b, 310c, 310d, etc.) based on information about the split shape mode indicating a predetermined splitting method.

[0232] Referring to FIG. 3, the image decoding device (100) may determine two coding units (310b) into which the current coding unit (300) is vertically divided based on information about a split shape mode indicating that the current coding unit (300) is vertically divided according to one embodiment. The image decoding device (100) may determine two coding units (310c) into which the current coding unit (300) is horizontally divided based on information about a split shape mode indicating that the current coding unit (300) is horizontally divided. The image decoding device (100) may determine four coding units (310d) into which the current coding unit (300) is vertically and horizontally divided based on information about a split shape mode indicating that the current coding unit (300) is vertically and horizontally divided. However, the split shapes into which a square coding unit may be split should not be interpreted as being limited to the above-described shapes, and may include various shapes that can be indicated by information about the split shape mode. The predetermined division forms into which a square encoding unit is divided are specifically described below through various embodiments.

[0233] FIG. 4 illustrates a process in which an image decoding device (100) divides a non-square coding unit to determine at least one coding unit according to one embodiment.

[0234] According to one embodiment, the image decoding device (100) may utilize block shape information indicating that the current encoding unit is non-square. The image decoding device (100) may determine whether to not split the current non-square encoding unit or to split it using a predetermined method based on information about the split shape mode. Referring to FIG. 4, when the block shape information of the current encoding unit (400 or 450) indicates a non-square shape, the image decoding device (100) may determine an encoding unit (410 or 460) having the same size as the current encoding unit (400 or 450) based on information about a split shape mode indicating that the encoding unit is not split, or may determine a split encoding unit (420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c) based on information about a split shape mode indicating a predetermined splitting method. A predetermined splitting method by which a non-square encoding unit is split will be described in detail through various embodiments below.

[0235] According to one embodiment, the image decoding device (100) may determine a form in which an encoding unit is split using information about a splitting shape mode, and in this case, the information about the splitting shape mode may indicate the number of at least one encoding unit generated by splitting the encoding unit. Referring to FIG. 4, if the information about the splitting shape mode indicates that the current encoding unit (400 or 450) is split into two encoding units, the image decoding device (100) may split the current encoding unit (400 or 450) based on the information about the splitting shape mode to determine two encoding units (420a, 420b, or 470a, 470b) included in the current encoding unit.

[0236] According to one embodiment, when the image decoding device (100) splits a current encoding unit (400 or 450) having a non-square shape based on information about a splitting shape mode, the image decoding device (100) may split the current encoding unit by considering the position of the long side of the non-square current encoding unit (400 or 450). For example, the image decoding device (100) may split the current encoding unit (400 or 450) in a direction that splits the long side of the current encoding unit (400 or 450) by considering the shape of the current encoding unit (400 or 450) to determine a plurality of encoding units.

[0237] According to one embodiment, if the information about the split shape mode indicates that the coding unit is split into an odd number of blocks (tri-split), the image decoding device (100) may determine an odd number of coding units included in the current coding unit (400 or 450). For example, if the information about the split shape mode indicates that the current coding unit (400 or 450) is split into three coding units, the image decoding device (100) may split the current coding unit (400 or 450) into three coding units (430a, 430b, 430c, 480a, 480b, 480c).

[0238] According to one embodiment, the ratio of the width and height of the current encoding unit (400 or 450) may be 4:1 or 1:4. When the ratio of the width and height is 4:1, the length of the width is longer than the length of the height, so the block shape information may be in the horizontal direction. When the ratio of the width and height is 1:4, the length of the width is shorter than the length of the height, so the block shape information may be in the vertical direction. The image decoding device (100) may determine to split the current encoding unit into an odd number of blocks based on information about the split shape mode. In addition, the image decoding device (100) may determine the splitting direction of the current encoding unit (400 or 450) based on the block shape information of the current encoding unit (400 or 450). For example, if the current encoding unit (400) is in the vertical direction, the image decoding device (100) can divide the current encoding unit (400) in the horizontal direction to determine encoding units (430a, 430b, 430c). Also, if the current encoding unit (450) is in the horizontal direction, the image decoding device (100) can divide the current encoding unit (450) in the vertical direction to determine encoding units (480a, 480b, 480c).

[0239] According to one embodiment, the image decoding device (100) may determine an odd number of coding units included in the current coding unit (400 or 450), and the sizes of the determined coding units may not all be the same. For example, among the determined odd number of coding units (430a, 430b, 430c, 480a, 480b, 480c), the size of a given coding unit (430b or 480b) may have a different size from the other coding units (430a, 430c, 480a, 480c). That is, the encoding units into which the current encoding unit (400 or 450) can be divided and determined can have multiple types of sizes, and in some cases, an odd number of encoding units (430a, 430b, 430c, 480a, 480b, 480c) can each have different sizes.

[0240] According to one embodiment, when information about the split shape mode indicates that the coding unit is split into an odd number of blocks, the image decoding device (100) may determine an odd number of coding units included in the current coding unit (400 or 450), and further, the image decoding device (100) may place a predetermined restriction on at least one coding unit among the odd number of coding units generated by splitting. Referring to FIG. 4, the image decoding device (100) may perform a decoding process for a coding unit (430b, 480b) located in the center among three coding units (430a, 430b, 430c, 480a, 480b, 480c) generated by splitting the current coding unit (400 or 450) differently from the decoding process for other coding units (430a, 430c, 480a, 480c). For example, the image decoding device (100) can restrict the encoding unit (430b, 480b) located in the center from being split any further, unlike other encoding units (430a, 430c, 480a, 480c), or can restrict it to be split only a predetermined number of times.

[0241] FIG. 5 illustrates a process in which an image decoding device (100) divides an encoding unit based on at least one of block shape information and information about a division shape mode, according to one embodiment.

[0242] According to one embodiment, the image decoding device (100) may determine whether to split or not to split a first coding unit (500) having a square shape into coding units based on at least one of block shape information and information about a split shape mode. According to one embodiment, when the information about the split shape mode indicates splitting the first coding unit (500) in the horizontal direction, the image decoding device (100) may split the first coding unit (500) in the horizontal direction to determine a second coding unit (510). The first coding unit, the second coding unit, and the third coding unit used according to one embodiment are terms used to understand the relationship before and after splitting between coding units. For example, when the first coding unit is split, the second coding unit may be determined, and when the second coding unit is split, the third coding unit may be determined. Hereinafter, the relationship between the first coding unit, the second coding unit, and the third coding unit used may be understood to follow the above-described characteristics.

[0243] According to one embodiment, the image decoding device (100) may determine to split or not split the determined second encoding unit (510) into encoding units based on at least one of block shape information and information about a split shape mode. Referring to FIG. 5, the image decoding device (100) may split the first encoding unit (500) based on at least one of block shape information and information about a split shape mode, and may split the determined second encoding unit (510) of a non-square shape into at least one third encoding unit (520a, 520b, 520c, 520d, etc.) or may not split the second encoding unit (510). The image decoding device (100) can obtain at least one of block shape information and information about a split shape mode, and the image decoding device (100) can split the first encoding unit (500) based on at least one of the obtained block shape information and information about a split shape mode to split a plurality of second encoding units (e.g., 510) of various shapes, and the second encoding unit (510) can be split according to the way in which the first encoding unit (500) is split based on at least one of the block shape information and information about a split shape mode. According to one embodiment, when the first coding unit (500) is split into second coding units (510) based on at least one of the block shape information and the split shape mode information for the first coding unit (500), the second coding unit (510) may also be split into third coding units (e.g., 520a, 520b, 520c, 520d, etc.) based on at least one of the block shape information and the split shape mode information for the second coding unit (510). That is, the coding unit may be split recursively based on at least one of the block shape information and the split shape mode information related to each coding unit.Therefore, a square coding unit can be determined from a non-square coding unit, and this square coding unit can be recursively divided to determine a non-square coding unit.

[0244] Referring to FIG. 5, among the odd number of third coding units (520b, 520c, 520d) determined by splitting the second coding unit (510) having a non-square shape, a predetermined coding unit (e.g., a coding unit located in the middle or a coding unit having a square shape) may be split recursively. According to an embodiment, the third coding unit (520b) having a square shape, which is one of the odd number of third coding units (520b, 520c, 520d), may be split horizontally into a plurality of fourth coding units. The fourth coding unit (530b or 530d) having a non-square shape, which is one of the plurality of fourth coding units (530a, 530b, 530c, 530d), may be split again into a plurality of coding units. For example, the fourth coding unit (530b or 530d) having a non-square shape may be further divided into an odd number of coding units. Methods that can be used for recursive division of coding units will be described later through various embodiments.

[0245] According to one embodiment, the image decoding device (100) may split each of the third encoding units (520a, 520b, 520c, 520d, etc.) into encoding units based on at least one of block shape information and information about a split shape mode. In addition, the image decoding device (100) may determine not to split the second encoding unit (510) based on at least one of block shape information and information about a split shape mode. According to one embodiment, the image decoding device (100) may split the second encoding unit (510) having a non-square shape into an odd number of third encoding units (520b, 520c, 520d). The image decoding device (100) may place a predetermined restriction on a predetermined third encoding unit among the odd number of third encoding units (520b, 520c, 520d). For example, the image decoding device (100) can limit the encoding unit (520c) located in the middle among an odd number of third encoding units (520b, 520c, 520d) to not be divided any further or to be divided a settable number of times.

[0246] Referring to FIG. 5, the image decoding device (100) may limit the coding unit (520c) located in the middle among the odd number of third coding units (520b, 520c, 520d) included in the second coding unit (510) having a non-square shape to not be split any further, or to be split in a predetermined split form (for example, to be split only into four coding units or to be split in a form corresponding to the split form of the second coding unit (510), or to be split only a predetermined number of times (for example, to be split only n times, where n>0). However, the above limitations on the coding unit (520c) located in the middle are merely simple embodiments and should not be interpreted as being limited to the above-described embodiments, but should be interpreted as including various limitations in which the coding unit (520c) located in the middle can be decoded differently from the other coding units (520b, 520d).

[0247] According to one embodiment, the image decoding device (100) can obtain at least one of block shape information and segmentation shape mode information used to segment the current encoding unit from a predetermined location within the current encoding unit.

[0248] FIG. 6 illustrates a method for an image decoding device (100) to determine a predetermined encoding unit among an odd number of encoding units according to one embodiment.

[0249] Referring to FIG. 6, at least one of the block shape information and the information on the partition shape mode of the current encoding unit (600, 650) can be obtained from a sample at a predetermined position among a plurality of samples included in the current encoding unit (600, 650) (for example, a sample (640, 690) located in the center). However, the predetermined position within the current encoding unit (600) from which at least one of the block shape information and the information on the partition shape mode can be obtained should not be interpreted as being limited to the center position illustrated in FIG. 6, but should be interpreted as including various positions (for example, top, bottom, left, right, top left, bottom left, top right, or bottom right, etc.) that can be included within the current encoding unit (600). The image decoding device (100) can obtain at least one of block shape information and segmentation shape mode information obtained from a predetermined location, and determine whether to segment or not segment the current encoding unit into encoding units of various shapes and sizes.

[0250] According to one embodiment, the image decoding device (100) may select one of the coding units when the current coding unit is divided into a predetermined number of coding units. Various methods may be used to select one of the multiple coding units, and descriptions of such methods will be provided later through various embodiments.

[0251] According to one embodiment, the image decoding device (100) can divide the current encoding unit into a plurality of encoding units and determine an encoding unit at a predetermined position.

[0252] According to one embodiment, the image decoding device (100) may use information indicating the positions of each of the odd-numbered coding units to determine an coding unit located in the middle of the odd-numbered coding units. Referring to FIG. 6, the image decoding device (100) may divide the current coding unit (600) or the current coding unit (650) to determine odd-numbered coding units (620a, 620b, 620c) or odd-numbered coding units (660a, 660b, 660c). The image decoding device (100) may use information about the positions of the odd-numbered coding units (620a, 620b, 620c) or odd-numbered coding units (660a, 660b, 660c) to determine the middle coding unit (620b) or the middle coding unit (660b). For example, the image decoding device (100) can determine the coding unit (620b) located in the center by determining the positions of the coding units (620a, 620b, 620c) based on information indicating the positions of predetermined samples included in the coding units (620a, 620b, 620c). Specifically, the image decoding device (100) can determine the coding unit (620b) located in the center by determining the positions of the coding units (620a, 620b, 620c) based on information indicating the positions of samples (630a, 630b, 630c) at the upper left of the coding units (620a, 620b, 620c).

[0253] According to one embodiment, information indicating the positions of the upper left samples (630a, 630b, 630c) included in each of the coding units (620a, 620b, 620c) may include information on the positions or coordinates of the coding units (620a, 620b, 620c) within the picture. According to one embodiment, information indicating the positions of the upper left samples (630a, 630b, 630c) included in each of the coding units (620a, 620b, 620c) may include information indicating the width or height of the coding units (620a, 620b, 620c) included in the current coding unit (600), and this width or height may correspond to information indicating the difference between the coordinates of the coding units (620a, 620b, 620c) within the picture. That is, the image decoding device (100) can determine the encoding unit (620b) located in the center by directly using information about the positions or coordinates of the encoding units (620a, 620b, 620c) within the picture or by using information about the width or height of the encoding unit corresponding to the difference between the coordinates.

[0254] According to one embodiment, information indicating the position of the sample (630a) at the upper left of the upper encoding unit (620a) may represent (xa, ya) coordinates, information indicating the position of the sample (530b) at the upper left of the middle encoding unit (620b) may represent (xb, yb) coordinates, and information indicating the position of the sample (630c) at the upper left of the lower encoding unit (620c) may represent (xc, yc) coordinates. The image decoding device (100) may determine the middle encoding unit (620b) using the coordinates of the upper left samples (630a, 630b, 630c) included in the encoding units (620a, 620b, 620c), respectively. For example, when the coordinates of the samples (630a, 630b, 630c) on the upper left are sorted in ascending or descending order, the encoding unit (620b) including the coordinates (xb, yb) of the sample (630b) located in the center can be determined as the encoding unit located in the center among the encoding units (620a, 620b, 620c) determined by dividing the current encoding unit (600). However, the coordinates indicating the positions of the upper left samples (630a, 630b, 630c) may indicate coordinates indicating the absolute positions within the picture, and further, based on the position of the upper left sample (630a) of the upper left coding unit (620a), the (dxb, dyb) coordinates, which are information indicating the relative position of the sample (630b) of the upper left of the middle coding unit (620b), and the (dxc, dyc) coordinates, which are information indicating the relative position of the sample (630c) of the upper left of the lower coding unit (620c), may be used. In addition, the method of determining the coding unit of a given position by using the coordinates of the corresponding sample as information indicating the position of the sample included in the coding unit should not be interpreted as being limited to the above-described method, but should be interpreted as various arithmetic methods that can utilize the coordinates of the sample.

[0255] According to one embodiment, the image decoding device (100) may divide the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c), and select an encoding unit from among the encoding units (620a, 620b, 620c) according to a predetermined criterion. For example, the image decoding device (100) may select an encoding unit (620b) having a different size from among the encoding units (620a, 620b, 620c).

[0256] According to one embodiment, the image decoding device (100) may determine the width or height of each of the encoding units (620a, 620b, 620c) by using the (xa, ya) coordinate, which is information indicating the position of the sample (630a) at the upper left of the upper encoding unit (620a), the (xb, yb) coordinate, which is information indicating the position of the sample (630b) at the upper left of the middle encoding unit (620b), and the (xc, yc) coordinate, which is information indicating the position of the sample (630c) at the upper left of the lower encoding unit (620c). The image decoding device (100) can determine the size of each of the encoding units (620a, 620b, 620c) using coordinates (xa, ya), (xb, yb), (xc, yc) indicating the positions of the encoding units (620a, 620b, 620c). According to one embodiment, the image decoding device (100) can determine the width of the upper encoding unit (620a) as the width of the current encoding unit (600). The image decoding device (100) can determine the height of the upper encoding unit (620a) as yb-ya. According to one embodiment, the image decoding device (100) can determine the width of the middle encoding unit (620b) as the width of the current encoding unit (600). The image decoding device (100) may determine the height of the middle encoding unit (620b) as yc-yb. According to one embodiment, the image decoding device (100) may determine the width or height of the lower encoding unit using the width or height of the current encoding unit and the width and height of the upper encoding unit (620a) and the middle encoding unit (620b). The image decoding device (100) may determine an encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (620a, 620b, 620c).Referring to FIG. 6, the image decoding device (100) can determine the middle encoding unit (620b) having a different size from the sizes of the upper encoding unit (620a) and the lower encoding unit (620c) as the encoding unit of a predetermined position. However, the process by which the image decoding device (100) described above determines the encoding unit having a different size from other encoding units is merely an embodiment of determining the encoding unit of a predetermined position using the size of the encoding unit determined based on sample coordinates, and therefore, various processes of determining the encoding unit of a predetermined position by comparing the sizes of the encoding units determined according to predetermined sample coordinates can be used.

[0257] The image decoding device (100) can determine the width or height of each of the encoding units (660a, 660b, 660c) by using the (xd, yd) coordinate, which is information indicating the position of the sample (670a) at the upper left of the left encoding unit (660a), the (xe, ye) coordinate, which is information indicating the position of the sample (670b) at the upper left of the middle encoding unit (660b), and the (xf, yf) coordinate, which is information indicating the position of the sample (670c) at the upper left of the right encoding unit (660c). The image decoding device (100) can determine the size of each of the encoding units (660a, 660b, 660c) by using the (xd, yd), (xe, ye), (xf, yf), which are coordinates indicating the positions of the encoding units (660a, 660b, 660c).

[0258] According to one embodiment, the image decoding device (100) may determine the width of the left encoding unit (660a) as xe-xd. The image decoding device (100) may determine the height of the left encoding unit (660a) as the height of the current encoding unit (650). According to one embodiment, the image decoding device (100) may determine the width of the middle encoding unit (660b) as xf-xe. The image decoding device (100) may determine the height of the middle encoding unit (660b) as the height of the current encoding unit (600). According to one embodiment, the image decoding device (100) may determine the width or height of the right encoding unit (660c) using the width or height of the current encoding unit (650) and the widths and heights of the left encoding unit (660a) and the middle encoding unit (660b). The image decoding device (100) can determine an encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (660a, 660b, 660c). Referring to FIG. 6, the image decoding device (100) can determine a middle encoding unit (660b) having a different size from the sizes of the left encoding unit (660a) and the right encoding unit (660c) as an encoding unit at a predetermined position. However, the process of the image decoding device (100) described above determining an encoding unit having a different size from other encoding units is merely an embodiment of determining an encoding unit at a predetermined position using the size of the encoding unit determined based on sample coordinates, and therefore, various processes of determining an encoding unit at a predetermined position by comparing the sizes of the encoding units determined according to predetermined sample coordinates can be used.

[0259] However, the location of the sample considered for determining the location of the encoding unit should not be interpreted as being limited to the upper left corner described above, and it can be interpreted that information on the location of any sample included in the encoding unit can be used.

[0260] According to one embodiment, the image decoding device (100) may select an encoding unit at a predetermined position from among an odd number of encoding units determined by splitting the current encoding unit, taking into consideration the shape of the current encoding unit. For example, if the current encoding unit has a non-square shape in which the width is longer than the height, the image decoding device (100) may determine an encoding unit at a predetermined position in the horizontal direction. That is, the image decoding device (100) may determine one of the encoding units whose positions vary in the horizontal direction and place a restriction on the corresponding encoding unit. If the current encoding unit has a non-square shape in which the height is longer than the width, the image decoding device (100) may determine an encoding unit at a predetermined position in the vertical direction. That is, the image decoding device (100) may determine one of the encoding units whose positions vary in the vertical direction and place a restriction on the corresponding encoding unit.

[0261] According to one embodiment, the image decoding device (100) may use information indicating the positions of each of the even-numbered coding units to determine the coding unit at a predetermined position among the even-numbered coding units. The image decoding device (100) may determine the even-numbered coding units by splitting the current coding unit (binary splitting) and may determine the coding unit at a predetermined position using information about the positions of the even-numbered coding units. A specific process for this may correspond to a process of determining the coding unit at a predetermined position (e.g., the center position) among the odd-numbered coding units described above in FIG. 6, and thus will be omitted.

[0262] According to one embodiment, when a current encoding unit having a non-square shape is split into a plurality of encoding units, predetermined information about the encoding unit at a predetermined position may be used during the splitting process to determine an encoding unit at a predetermined position among the plurality of encoding units. For example, the image decoding device (100) may use at least one of block shape information and split shape mode information stored in a sample included in a middle encoding unit during the splitting process to determine an encoding unit located in the middle among the encoding units into which the current encoding unit is split.

[0263] Referring to FIG. 6, the image decoding device (100) can split the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c) based on at least one of block shape information and information on a split shape mode, and can determine an encoding unit (620b) located in the middle among the plurality of encoding units (620a, 620b, 620c). Furthermore, the image decoding device (100) can determine an encoding unit (620b) located in the middle by considering a position where at least one of block shape information and information on a split shape mode is acquired. That is, at least one of the block shape information and the information about the split shape mode of the current encoding unit (600) can be obtained from a sample (640) located in the center of the current encoding unit (600), and when the current encoding unit (600) is split into a plurality of encoding units (620a, 620b, 620c) based on at least one of the block shape information and the information about the split shape mode, the encoding unit (620b) including the sample (640) can be determined as the encoding unit located in the center. However, the information used to determine the encoding unit located in the center should not be interpreted as being limited to at least one of the block shape information and the information about the split shape mode, and various types of information can be used in the process of determining the encoding unit located in the center.

[0264] According to one embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, the image decoding apparatus (100) may use at least one of block shape information and information on a split shape mode obtained from a sample at a predetermined position within the current coding unit (600) (e.g., a sample located at the center of the current coding unit (600)) to determine a coding unit at a predetermined position (e.g., a coding unit located at the center of the coding unit divided into multiple coding units) among a plurality of coding units (620a, 620b, 620c) determined by splitting the current coding unit (600). That is, the image decoding device (100) can determine the sample at the predetermined position by considering the block shape of the current encoding unit (600), and the image decoding device (100) can determine an encoding unit (620b) that includes a sample from which predetermined information (for example, at least one of block shape information and information on a division shape mode) can be obtained, among a plurality of encoding units (620a, 620b, 620c) determined by splitting the current encoding unit (600), and can set a predetermined restriction. Referring to FIG. 6, according to one embodiment, the image decoding device (100) can determine a sample (640) located at the center of the current encoding unit (600) as a sample from which predetermined information can be obtained, and the image decoding device (100) can set a predetermined restriction on the encoding unit (620b) that includes this sample (640) during the decoding process. However, the location of the sample from which certain information can be obtained should not be interpreted as being limited to the above-described location, but may be interpreted as samples at any location included in the encoding unit (620b) to be determined in order to set a limitation.

[0265] According to one embodiment, the position of a sample from which predetermined information can be obtained may be determined according to the shape of the current encoding unit (600). According to one embodiment, the block shape information may determine whether the shape of the current encoding unit is square or non-square, and may determine the position of a sample from which predetermined information can be obtained according to the shape. For example, the image decoding apparatus (100) may determine a sample located on a boundary that divides at least one of the width and height of the current encoding unit in half as a sample from which predetermined information can be obtained, using at least one of information about the width and information about the height of the current encoding unit. As another example, when the block shape information related to the current encoding unit indicates that the shape is non-square, the image decoding apparatus (100) may determine one of the samples adjacent to the boundary that divides the long side of the current encoding unit in half as a sample from which predetermined information can be obtained.

[0266] According to one embodiment, when the image decoding device (100) divides the current encoding unit into a plurality of encoding units, in order to determine an encoding unit at a predetermined position among the plurality of encoding units, at least one of block shape information and information about a split shape mode may be used. According to one embodiment, the image decoding device (100) may obtain at least one of the block shape information and the information about the split shape mode from a sample at a predetermined position included in the encoding unit, and the image decoding device (100) may divide the plurality of encoding units generated by splitting the current encoding unit by using at least one of the information about the split shape mode and the block shape information obtained from a sample at a predetermined position included in each of the plurality of encoding units. That is, the encoding unit may be recursively divided by using at least one of the block shape information and the information about the split shape mode obtained from a sample at a predetermined position included in each of the encoding units. Since the recursive division process of the encoding unit has been described above with reference to FIG. 5, a detailed description thereof will be omitted.

[0267] According to one embodiment, the image decoding device (100) can divide a current encoding unit to determine at least one encoding unit, and can determine the order in which the at least one encoding unit is decoded according to a predetermined block (e.g., the current encoding unit).

[0268] FIG. 7 illustrates the order in which multiple encoding units are processed when an image decoding device (100) divides a current encoding unit to determine multiple encoding units according to one embodiment.

[0269] According to one embodiment, the image decoding device (100) may determine second encoding units (710a, 710b) by vertically dividing the first encoding unit (700) according to block shape information and information about the split shape mode, determine second encoding units (730a, 730b) by horizontally dividing the first encoding unit (700), or determine second encoding units (750a, 750b, 750c, 750d) by vertically and horizontally dividing the first encoding unit (700).

[0270] Referring to FIG. 7, the image decoding device (100) can determine the order in which the second encoding units (710a, 710b) determined by vertically dividing the first encoding unit (700) are processed in the horizontal direction (710c). The image decoding device (100) can determine the order in which the second encoding units (730a, 730b) determined by horizontally dividing the first encoding unit (700) are processed in the vertical direction (730c). The image decoding device (100) can determine the second encoding units (750a, 750b, 750c, 750d) determined by dividing the first encoding unit (700) in the vertical and horizontal directions according to a predetermined order (e.g., raster scan order (750e) or z scan order (z scan order)) in which encoding units located in one row are processed and then encoding units located in the next row are processed.

[0271] According to one embodiment, the image decoding device (100) can recursively split the encoding units. Referring to FIG. 7, the image decoding device (100) can split the first encoding unit (700) to determine a plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d), and can recursively split each of the determined plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d). A method for splitting a plurality of coding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may be a method corresponding to a method for splitting the first coding unit (700). Accordingly, the plurality of coding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may each be independently split into a plurality of coding units. Referring to FIG. 7, the image decoding device (100) may split the first coding unit (700) in the vertical direction to determine the second coding units (710a, 710b), and further may determine to independently split or not split each of the second coding units (710a, 710b).

[0272] According to one embodiment, the image decoding device (100) may horizontally divide the second encoding unit (710a) on the left into third encoding units (720a, 720b), and may not divide the second encoding unit (710b) on the right.

[0273] According to one embodiment, the processing order of the coding units may be determined based on the splitting process of the coding units. In other words, the processing order of the split coding units may be determined based on the processing order of the coding units immediately before splitting. The image decoding device (100) may determine the processing order of the third coding units (720a, 720b) ​​determined by splitting the second coding unit (710a) on the left, independently from the second coding unit (710b) on the right. Since the second coding unit (710a) on the left is split horizontally and the third coding units (720a, 720b) ​​are determined, the third coding units (720a, 720b) ​​may be processed in the vertical direction (720c). In addition, since the order in which the second encoding unit (710a) on the left and the second encoding unit (710b) on the right are processed corresponds to the horizontal direction (710c), the right encoding unit (710b) can be processed after the third encoding units (720a, 720b) ​​included in the second encoding unit (710a) on the left are processed in the vertical direction (720c). Since the above-described content is intended to explain the process in which the processing order of the encoding units is determined according to the encoding units before splitting, it should not be interpreted as being limited to the above-described embodiment, but should be interpreted as being used in various ways in which encoding units that are split and determined in various forms can be independently processed according to a predetermined order.

[0274] FIG. 8 illustrates a process for determining that a current encoding unit is divided into an odd number of encoding units when the encoding units cannot be processed in a predetermined order, according to one embodiment of the present invention.

[0275] According to one embodiment, the image decoding device (100) may determine that the current encoding unit is split into an odd number of encoding units based on the acquired block shape information and information about the split shape mode. Referring to FIG. 8, a first encoding unit (800) having a square shape may be split into second encoding units (810a, 810b) having a non-square shape, and the second encoding units (810a, 810b) may each be independently split into third encoding units (820a, 820b, 820c, 820d, 820e). According to one embodiment, the image decoding device (100) can determine a plurality of third encoding units (820a, 820b) by horizontally dividing the left encoding unit (810a) among the second encoding units, and can divide the right encoding unit (810b) into an odd number of third encoding units (820c, 820d, 820e).

[0276] According to one embodiment, the image decoding device (100) can determine whether there is an odd number of split coding units by determining whether the third coding units (820a, 820b, 820c, 820d, 820e) can be processed in a predetermined order. Referring to FIG. 8, the image decoding device (100) can determine the third coding units (820a, 820b, 820c, 820d, 820e) by recursively splitting the first coding unit (800). The image decoding device (100) can determine whether the first encoding unit (800), the second encoding unit (810a, 810b), or the third encoding unit (820a, 820b, 820c, 820d, 820e) is split into an odd number of encoding units among the splitting forms based on at least one of the block shape information and the splitting shape mode information. For example, the encoding unit located on the right side among the second encoding units (810a, 810b) can be split into an odd number of third encoding units (820c, 820d, 820e). The order in which the plurality of encoding units included in the first encoding unit (800) are processed can be a predetermined order (e.g., z-scan order (830)), and the image decoding device (100) can determine whether the third encoding unit (820c, 820d, 820e) determined by dividing the second encoding unit (810b) on the right into odd numbers satisfies the condition that it can be processed according to the predetermined order.

[0277] According to one embodiment, the image decoding device (100) may determine whether the third encoding units (820a, 820b, 820c, 820d, 820e) included in the first encoding unit (800) satisfy a condition that they can be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the second encoding unit (810a, 810b) is split in half according to the boundary of the third encoding unit (820a, 820b, 820c, 820d, 820e). For example, the third encoding unit (820a, 820b) determined by splitting the height of the left second encoding unit (810a) of a non-square shape in half may satisfy the condition. Since the boundaries of the third encoding units (820c, 820d, 820e) determined by dividing the right second encoding unit (810b) into three encoding units do not divide the width or height of the right second encoding unit (810b) in half, it may be determined that the third encoding units (820c, 820d, 820e) do not satisfy the condition. In the case where this condition is not satisfied, the image decoding device (100) may determine that there is a disconnection in the scanning order, and may determine that the right second encoding unit (810b) is divided into an odd number of encoding units based on the determination result. According to an embodiment, the image decoding device (100) may place a predetermined restriction on an encoding unit at a predetermined position among the divided encoding units when the encoding unit is divided into an odd number of encoding units. Since the contents of such restrictions or predetermined positions have been described above through various embodiments, a detailed description thereof will be omitted.

[0278] FIG. 9 illustrates a process in which an image decoding device (100) divides a first encoding unit (900) to determine at least one encoding unit according to one embodiment.

[0279] According to one embodiment, the image decoding device (100) may split the first coding unit (900) based on at least one of the block shape information and the information on the split shape mode obtained through the receiver (not shown). The first coding unit (900) having a square shape may be split into four coding units having a square shape or may be split into a plurality of coding units having a non-square shape. For example, referring to FIG. 9, when the block shape information indicates that the first coding unit (900) is square and the information on the split shape mode indicates that the first coding unit (900) is split into coding units of a non-square shape, the image decoding device (100) may split the first coding unit (900) into a plurality of non-square coding units. Specifically, when information about the split shape mode indicates that the first encoding unit (900) is split in the horizontal or vertical direction to determine an odd number of encoding units, the image decoding device (100) can split the first encoding unit (900) having a square shape into second encoding units (910a, 910b, 910c) determined by splitting them in the vertical direction into an odd number of encoding units or second encoding units (920a, 920b, 920c) determined by splitting them in the horizontal direction.

[0280] According to one embodiment, the image decoding device (100) can determine whether the second encoding units (910a, 910b, 910c, 920a, 920b, 920c) included in the first encoding unit (900) satisfy a condition that allows them to be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the first encoding unit (900) is split in half according to the boundary of the second encoding units (910a, 910b, 910c, 920a, 920b, 920c). Referring to FIG. 9, since the boundaries of the second coding units (910a, 910b, 910c) determined by vertically dividing the first coding unit (900) in a square shape do not divide the width of the first coding unit (900) in half, it may be determined that the first coding unit (900) does not satisfy the condition that it can be processed in a predetermined order. In addition, since the boundaries of the second coding units (920a, 920b, 920c) determined by horizontally dividing the first coding unit (900) in a square shape do not divide the width of the first coding unit (900) in half, it may be determined that the first coding unit (900) does not satisfy the condition that it can be processed in a predetermined order. If such a condition is not satisfied, the image decoding device (100) may determine that the scan order is disconnected, and based on the determination result, may determine that the first encoding unit (900) is divided into an odd number of encoding units. According to one embodiment, the image decoding device (100) may place a predetermined restriction on an encoding unit at a predetermined position among the divided encoding units when the encoding unit is divided into an odd number of encoding units. Since the contents of such restrictions or predetermined positions, etc. have been described above through various embodiments, a detailed description thereof will be omitted.

[0281] According to one embodiment, the image decoding device (100) can divide the first encoding unit to determine encoding units of various shapes.

[0282] Referring to FIG. 9, the image decoding device (100) can divide the first encoding unit (900) having a square shape and the first encoding unit (930 or 950) having a non-square shape into encoding units of various shapes.

[0283] FIG. 10 illustrates that, according to one embodiment, a video decoding device (100) limits the shapes into which a second encoding unit can be divided when a non-square shape of a second encoding unit determined by splitting a first encoding unit (1000) satisfies a predetermined condition.

[0284] According to one embodiment, the image decoding device (100) may determine to split a first coding unit (1000) having a square shape into second coding units (1010a, 1010b, 1020a, 1020b) having a non-square shape based on at least one of block shape information and information about a split shape mode obtained through a receiving unit (not shown). The second coding units (1010a, 1010b, 1020a, 1020b) may be split independently. Accordingly, the image decoding device (100) may determine to split or not split into a plurality of coding units based on at least one of block shape information and information about a split shape mode related to each of the second coding units (1010a, 1010b, 1020a, 1020b). According to one embodiment, the image decoding device (100) may determine third encoding units (1012a, 1012b) by horizontally dividing the left second encoding unit (1010a) having a non-square shape determined by vertically dividing the first encoding unit (1000). However, when the image decoding device (100) divides the left second encoding unit (1010a) in the horizontal direction, the right second encoding unit (1010b) may be restricted from being horizontally divided in the same direction as the direction in which the left second encoding unit (1010a) is divided. If the second encoding unit on the right (1010b) is split in the same direction to determine the third encoding unit (1014a, 1014b), the second encoding unit on the left (1010a) and the second encoding unit on the right (1010b) can be independently split in the horizontal direction to determine the third encoding unit (1012a, 1012b, 1014a, 1014b).However, this is the same result as the image decoding device (100) dividing the first encoding unit (1000) into four square-shaped second encoding units (1030a, 1030b, 1030c, 1030d) based on at least one of the block shape information and the information on the split shape mode, which may be inefficient in terms of image decoding.

[0285] According to one embodiment, the image decoding device (100) may determine third coding units (1022a, 1022b, 1024a, 1024b) by vertically dividing a second coding unit (1020a or 1020b) having a non-square shape determined by dividing a first coding unit (1000) in a horizontal direction. However, when the image decoding device (100) vertically divides one of the second coding units (e.g., the upper second coding unit (1020a)), the other second coding units (e.g., the lower coding unit (1020b)) may be restricted from being vertically divided in the same direction as the direction in which the upper second coding unit (1020a) is divided, for the reasons described above.

[0286] FIG. 11 illustrates a process in which an image decoding device (100) divides a square-shaped encoding unit when information about a split shape mode cannot indicate division into four square-shaped encoding units according to one embodiment.

[0287] According to one embodiment, the image decoding device (100) may split the first encoding unit (1100) based on at least one of block shape information and information about a split shape mode to determine second encoding units (1110a, 1110b, 1120a, 1120b, etc.). The information about the split shape mode may include information about various shapes into which the encoding unit may be split, but the information about various shapes may not include information for splitting the encoding unit into four encoding units having a square shape. According to this information about the split shape mode, the image decoding device (100) cannot split the first encoding unit (1100) having a square shape into four second encoding units having a square shape (1130a, 1130b, 1130c, 1130d). Based on information about the split shape mode, the image decoding device (100) can determine a second encoding unit (1110a, 1110b, 1120a, 1120b, etc.) of a non-square shape.

[0288] According to one embodiment, the image decoding device (100) can independently split the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) having a non-square shape. Each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) can be split in a predetermined order using a recursive method, which may be a splitting method corresponding to a method in which the first encoding unit (1100) is split based on at least one of block shape information and information about a split shape mode.

[0289] For example, the image decoding device (100) can determine third coding units (1112a, 1112b) having a square shape by splitting the left second coding unit (1110a) in the horizontal direction, and can determine third coding units (1114a, 1114b) having a square shape by splitting the right second coding unit (1110b) in the horizontal direction. Furthermore, the image decoding device (100) can also determine third coding units (1116a, 1116b, 1116c, 1116d) having a square shape by splitting both the left second coding unit (1110a) and the right second coding unit (1110b) in the horizontal direction. In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).

[0290] As another example, the image decoding device (100) may determine third coding units (1122a, 1122b) having a square shape by vertically splitting the upper second coding unit (1120a), and may determine third coding units (1124a, 1124b) having a square shape by vertically splitting the lower second coding unit (1120b). Furthermore, the image decoding device (100) may determine third coding units (1126a, 1126b, 1126a, 1126b) having a square shape by vertically splitting both the upper second coding unit (1120a) and the lower second coding unit (1120b). In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).

[0291] FIG. 12 illustrates that, according to one embodiment, the processing order between multiple encoding units may vary depending on the process of dividing the encoding units.

[0292] According to one embodiment, the image decoding device (100) may split the first encoding unit (1200) based on block shape information and information about the split shape mode. If the block shape information indicates a square shape and the information about the split shape mode indicates that the first encoding unit (1200) is split in at least one of the horizontal direction and the vertical direction, the image decoding device (100) may split the first encoding unit (1200) to determine second encoding units (e.g., 1210a, 1210b, 1220a, 1220b, etc.). Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) having a non-square shape determined by splitting the first encoding unit 1200 only in the horizontal direction or the vertical direction may be independently split based on the block shape information and information about the split shape mode for each. For example, the image decoding device (100) can determine third encoding units (1216a, 1216b, 1216c, 1216d) by horizontally dividing second encoding units (1210a, 1210b) generated by vertically dividing the first encoding unit (1200), and can determine third encoding units (1226a, 1226b, 1226c, 1226d) by horizontally dividing second encoding units (1220a, 1220b) generated by horizontally dividing the first encoding unit (1200). Since the process of dividing the second encoding units (1210a, 1210b, 1220a, 1220b) has been described above with reference to FIG. 11, a detailed description thereof will be omitted.

[0293] According to one embodiment, the image decoding device (100) can process encoding units according to a predetermined order. Since the characteristics of processing encoding units according to a predetermined order have been described above with reference to FIG. 7, a detailed description thereof will be omitted. Referring to FIG. 12, the image decoding device (100) can divide a first encoding unit (1200) having a square shape and determine four third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) having a square shape. According to one embodiment, the image decoding device (100) can determine the processing order of the third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) depending on the form in which the first encoding unit (1200) is divided.

[0294] According to one embodiment, the image decoding device (100) may determine third encoding units (1216a, 1216b, 1216c, 1216d) by horizontally dividing the second encoding units (1210a, 1210b) generated by vertically dividing them, and the image decoding device (100) may process the third encoding units (1216a, 1216b, 1216c, 1216d) according to an order (1217) of first processing the third encoding units (1216a, 1216c) included in the left second encoding unit (1210a) in the vertical direction and then processing the third encoding units (1216b, 1216d) included in the right second encoding unit (1210b) in the vertical direction.

[0295] According to one embodiment, the image decoding device (100) may determine third encoding units (1226a, 1226b, 1226c, 1226d) by vertically dividing the second encoding units (1220a, 1220b) generated by being divided in the horizontal direction, and the image decoding device (100) may process the third encoding units (1226a, 1226b, 1226c, 1226d) according to an order (1227) of first processing the third encoding units (1226a, 1226b) included in the upper second encoding unit (1220a) in the horizontal direction and then processing the third encoding units (1226c, 1226d) included in the lower second encoding unit (1220b) in the horizontal direction.

[0296] Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) can be divided into third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) having a square shape. The second encoding units (1210a, 1210b) determined by being split in the vertical direction and the second encoding units (1220a, 1220b) determined by being split in the horizontal direction are split into different shapes, but according to the third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) determined later, the first encoding unit (1200) is ultimately split into encoding units of the same shape. Accordingly, even if the image decoding device (100) determines encoding units of the same shape as a result by recursively splitting the encoding units through different processes based on at least one of the block shape information and the information about the split shape mode, it can process a plurality of encoding units determined to have the same shape in different orders.

[0297] FIG. 13 illustrates a process in which the depth of an encoding unit is determined as the shape and size of the encoding unit change when the encoding unit is recursively divided to determine a plurality of encoding units according to one embodiment.

[0298] According to one embodiment, the image decoding device (100) may determine the depth of an encoding unit according to a predetermined criterion. For example, the predetermined criterion may be the length of a long side of the encoding unit. If the length of the long side of the current encoding unit is split to be 2n (n>0) times the length of the long side of the encoding unit before splitting, the image decoding device (100) may determine that the depth of the current encoding unit is increased by n compared to the depth of the encoding unit before splitting. Hereinafter, an encoding unit with an increased depth is expressed as an encoding unit of a lower depth.

[0299] Referring to FIG. 13, according to one embodiment, based on block shape information indicating a square shape (for example, the block shape information may indicate '0: SQUARE'), the image decoding device (100) may divide a first coding unit (1300) having a square shape to determine a second coding unit (1302), a third coding unit (1304), etc. of a lower depth. If the size of the first coding unit (1300) having a square shape is 2Nx2N, the second coding unit (1302) determined by dividing the width and height of the first coding unit (1300) by half may have a size of NxN. Furthermore, the third coding unit (1304) determined by dividing the width and height of the second coding unit (1302) by half may have a size of N / 2xN / 2. In this case, the width and height of the third encoding unit (1304) correspond to 1 / 4 of the width and height of the first encoding unit (1300). When the depth of the first encoding unit (1300) is D, the depth of the second encoding unit (1302), which is 1 / 2 of the width and height of the first encoding unit (1300), may be D+1, and the depth of the third encoding unit (1304), which is 1 / 4 of the width and height of the first encoding unit (1300), may be D+2.

[0300] According to one embodiment, based on block shape information indicating a non-square shape (for example, the block shape information may indicate '1: NS_VER' indicating a non-square shape in which the height is longer than the width or '2: NS_HOR' indicating a non-square shape in which the width is longer than the height), the image decoding device (100) may split a first coding unit (1310 or 1320) having a non-square shape to determine a second coding unit (1312 or 1322), a third coding unit (1314 or 1324) of a lower depth, etc.

[0301] The image decoding device (100) can determine a second encoding unit (e.g., 1302, 1312, 1322, etc.) by splitting at least one of the width and height of the first encoding unit (1310) having a size of Nx2N. That is, the image decoding device (100) can split the first encoding unit (1310) in the horizontal direction to determine a second encoding unit (1302) having a size of NxN or a second encoding unit (1322) having a size of NxN / 2, and can also split the first encoding unit (1310) in the horizontal direction and the vertical direction to determine a second encoding unit (1312) having a size of N / 2xN.

[0302] According to one embodiment, the image decoding device (100) may determine a second coding unit (e.g., 1302, 1312, 1322, etc.) by splitting at least one of the width and the height of the first coding unit (1320) having a size of 2NxN. That is, the image decoding device (100) may split the first coding unit (1320) in the vertical direction to determine a second coding unit (1302) having a size of NxN or a second coding unit (1312) having a size of N / 2xN, and may also split the first coding unit (1320) in the horizontal direction and the vertical direction to determine a second coding unit (1322) having a size of NxN / 2.

[0303] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1302) having a size of NxN. That is, the image decoding device (100) may split the second encoding unit (1302) in the vertical direction and the horizontal direction to determine a third encoding unit (1304) having a size of N / 2xN / 2, a third encoding unit (1314) having a size of N / 4xN / 2, or a third encoding unit (1324) having a size of N / 2xN / 4.

[0304] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1312) having a size of N / 2xN. That is, the image decoding device (100) may split the second encoding unit (1312) in the horizontal direction to determine a third encoding unit (1304) having a size of N / 2xN / 2 or a third encoding unit (1324) having a size of N / 2xN / 4, or split the second encoding unit (1312) in the vertical direction and the horizontal direction to determine a third encoding unit (1314) having a size of N / 4xN / 2.

[0305] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1322) having a size of NxN / 2. That is, the image decoding device (100) may split the second encoding unit (1322) in the vertical direction to determine a third encoding unit (1304) having a size of N / 2xN / 2 or a third encoding unit (1314) having a size of N / 4xN / 2, or split the second encoding unit (1322) in the vertical direction and the horizontal direction to determine a third encoding unit (1324) having a size of N / 2xN / 4.

[0306] According to one embodiment, the image decoding device (100) may split a square-shaped encoding unit (e.g., 1300, 1302, 1304) in a horizontal direction or a vertical direction. For example, a first encoding unit (1300) having a size of 2Nx2N may be split in the vertical direction to determine a first encoding unit (1310) having a size of Nx2N, or may be split in the horizontal direction to determine a first encoding unit (1320) having a size of 2NxN. According to one embodiment, when the depth is determined based on the length of the longest side of the encoding unit, the depth of the encoding unit determined by splitting the first encoding unit (1300) having a size of 2Nx2N in the horizontal direction or the vertical direction may be the same as the depth of the first encoding unit (1300).

[0307] According to one embodiment, the width and height of the third coding unit (1314 or 1324) may be 1 / 4 times that 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), which is 1 / 2 times the width and height of the first coding unit (1310 or 1320), may be D+1, and the depth of the third coding unit (1314 or 1324), which is 1 / 4 times the width and height of the first coding unit (1310 or 1320), may be D+2.

[0308] FIG. 14 illustrates an index (part index, hereinafter referred to as PID) for depth and encoding unit distinction that can be determined according to the shape and size of encoding units according to one embodiment.

[0309] According to one embodiment, the image decoding device (100) may split a first encoding unit (1400) having a square shape to determine second encoding units of various shapes. Referring to FIG. 14, the image decoding device (100) may split the first encoding unit (1400) in at least one of a vertical direction and a horizontal direction according to information about a splitting shape mode to determine second encoding units (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d). That is, the image decoding device (100) can determine the second encoding unit (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) based on information about the splitting form mode for the first encoding unit (1400).

[0310] According to one embodiment, the depth of the second coding units (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) determined based on information about the split shape mode for the first coding unit (1400) having a square shape may be determined based on the length of the long side. For example, since the length of one side of the first coding unit (1400) having a square shape and the length of the long side of the second coding unit (1402a, 1402b, 1404a, 1404b) having a non-square shape are the same, the depths of the first coding unit (1400) and the second coding units (1402a, 1402b, 1404a, 1404b) having a non-square shape may be considered to be the same as D. In contrast, when the image decoding device (100) divides the first encoding unit (1400) into four square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) based on information about the splitting shape mode, the length of one side of the square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) is half the length of one side of the first encoding unit (1400), so the depth of the second encoding units (1406a, 1406b, 1406c, 1406d) may be a depth of D+1, which is one depth lower than D, the depth of the first encoding unit (1400).

[0311] According to one embodiment, the image decoding device (100) may split a first encoding unit (1410) having a height greater than its width into a plurality of second encoding units (1412a, 1412b, 1414a, 1414b, 1414c) in the horizontal direction according to information about the splitting shape mode. According to one embodiment, the image decoding device (100) may split a first encoding unit (1420) having a width greater than its height into a plurality of second encoding units (1422a, 1422b, 1424a, 1424b, 1424c) in the vertical direction according to information about the splitting shape mode.

[0312] According to one embodiment, the second coding units (1412a, 1412b, 1414a, 1414b, 1414c. 1422a, 1422b, 1424a, 1424b, 1424c) determined based on information about the split shape mode for the first coding unit (1410 or 1420) of a non-square shape may have their depths determined based on the length of their long sides. For example, since the length of one side of the second encoding unit (1412a, 1412b) in the shape of a square is half the length of one side of the first encoding unit (1410) in the shape of a non-square having a height longer than a width, the depth of the second encoding unit (1412a, 1412b) in the shape of a square is D+1, which is one depth lower than the depth D of the first encoding unit (1410) in the shape of a non-square.

[0313] Furthermore, the image decoding device (100) may split a non-square first encoding unit (1410) into an odd number of second encoding units (1414a, 1414b, 1414c) based on information about the splitting shape mode. The odd number of second encoding units (1414a, 1414b, 1414c) may include second encoding units (1414a, 1414c) of a non-square shape and second encoding units (1414b) of a square shape. In this case, since the length of the long side of the second encoding unit (1414a, 1414c) of a non-square shape and the length of one side of the second encoding unit (1414b) of a square shape are half the length of one side of the first encoding unit (1410), the depth of the second encoding unit (1414a, 1414b, 1414c) may be a depth of D+1, which is one depth lower than D, which is the depth of the first encoding unit (1410). The image decoding device (100) may determine the depth of the encoding units associated with the first encoding unit (1420) of a non-square shape, in which the width is longer than the height, in a manner corresponding to the above method of determining the depth of the encoding units associated with the first encoding unit (1410).

[0314] According to one embodiment, when determining an index (PID) for distinguishing divided coding units, the image decoding device (100) may determine the index based on a size ratio between the coding units when the coding units divided into an odd number are not of the same size. Referring to FIG. 14, among the coding units (1414a, 1414b, 1414c) divided into an odd number, the coding unit (1414b) located in the middle may have the same width as the other coding units (1414a, 1414c) but may have a height that is twice the height of the coding units (1414a, 1414c) that are different in height. That is, in this case, the coding unit (1414b) located in the middle may include two of the other coding units (1414a, 1414c). Accordingly, if the index (PID) of the encoding unit (1414b) located in the middle according to the scanning order is 1, the index of the encoding unit (1414c) located in the next order may be 3, which is an increase of 2. In other words, there may be a discontinuity in the index value. According to one embodiment, the image decoding device (100) may determine whether the encoding units divided into an odd number are not of the same size based on the presence or absence of discontinuity in the index for distinguishing between the divided encoding units.

[0315] According to one embodiment, the image decoding device (100) may determine whether the image is divided into a specific split shape based on the value of an index for distinguishing a plurality of coding units that are divided from the current coding unit. Referring to FIG. 14, the image decoding device (100) may divide a first coding unit (1410) having a rectangular shape in which the height is longer than the width, to determine an even number of coding units (1412a, 1412b) or an odd number of coding units (1414a, 1414b, 1414c). The image decoding device (100) may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to one embodiment, the PID may be obtained from a sample (for example, an upper left sample) at a predetermined position of each coding unit.

[0316] According to one embodiment, the image decoding device (100) may determine an coding unit at a predetermined position among the coding units that are divided and determined using an index for distinguishing the coding units. According to one embodiment, when information about a split shape mode for a first coding unit (1410) having a rectangular shape with a height greater than the width indicates that the first coding unit (1410) is divided into three coding units, the image decoding device (100) may divide the first coding unit (1410) into three coding units (1414a, 1414b, 1414c). The image decoding device (100) may assign an index to each of the three coding units (1414a, 1414b, 1414c). The image decoding device (100) may compare the indexes for each coding unit to determine a middle coding unit among the coding units divided into an odd number of coding units. The image decoding device (100) may determine a coding unit (1414b) having an index corresponding to a middle value among the indices of the coding units as a coding unit at a middle position among the coding units determined by splitting the first coding unit (1410). According to an embodiment, when determining an index for distinguishing the split coding units, the image decoding device (100) may determine the index based on a size ratio between the coding units when the coding units do not have the same size. Referring to FIG. 14, the coding unit (1414b) generated by splitting the first coding unit (1410) may have the same width as other coding units (1414a, 1414c) but may be twice the height of the coding units (1414a, 1414c) that are different in height. In this case, if the index (PID) of the encoding unit (1414b) located in the middle is 1, the index of the encoding unit (1414c) located in the next order may be 3, which is an increase of 2.In cases like this where the index increases uniformly and then the increase width changes, the image decoding device (100) may determine that the current encoding unit is divided into a plurality of encoding units including encoding units having different sizes from other encoding units. According to one embodiment, when information about the splitting form mode indicates that the current encoding unit is divided into an odd number of encoding units, the image decoding device (100) may divide the current encoding unit into a form in which an encoding unit at a predetermined position among the odd number of encoding units (for example, a middle encoding unit) has a different size from the other encoding units. In this case, the image decoding device (100) may determine the middle encoding unit having a different size using an index (PID) for the encoding unit. However, the above-described index, the size or position of the encoding unit at the predetermined position to be determined are specific for explaining one embodiment and should not be interpreted as being limited thereto, and it should be interpreted that various indexes, positions and sizes of encoding units can be used.

[0317] According to one embodiment, the image decoding device (100) may utilize a predetermined data unit from which recursive division of the encoding unit begins.

[0318] FIG. 15 illustrates that a plurality of encoding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment.

[0319] According to one embodiment, a predetermined data unit may be defined as a data unit from which a coding unit begins to be recursively split using at least one of block shape information and information about a split shape mode. That is, it may correspond to a coding unit of the highest depth used in the process of determining a plurality of coding units for splitting the current picture. For convenience of explanation, this predetermined data unit will be referred to as a reference data unit hereinafter.

[0320] In one embodiment, the reference data unit may exhibit a predetermined size and shape. In one embodiment, the reference coding unit may include MxN samples, where M and N may be the same and may be integers expressed as powers of 2. That is, the reference data unit may exhibit a square or non-square shape, and may be subsequently divided into an integer number of coding units.

[0321] According to one embodiment, the image decoding device (100) can divide the current picture into a plurality of reference data units. According to one embodiment, the image decoding device (100) can divide the plurality of reference data units into which the current picture is divided using information about the division form mode for each reference data unit. This division process of the reference data units can correspond to a division process using a quad-tree structure.

[0322] According to one embodiment, the image decoding device (100) may determine in advance the minimum size that a reference data unit included in the current picture may have. Accordingly, the image decoding device (100) may determine reference data units of various sizes having a size greater than or equal to the minimum size, and may determine at least one encoding unit using block shape information and information about a segmentation shape mode based on the determined reference data unit.

[0323] Referring to FIG. 15, the image decoding device (100) may use a reference coding unit (2000) having a square shape, or may use a reference coding unit (2002) having a non-square shape. According to one embodiment, the shape and size of the reference coding unit may be determined according to various data units (e.g., sequence, picture, slice, slice segment, maximum coding unit, etc.) that may include at least one reference coding unit.

[0324] According to one embodiment, the receiving unit (not shown) of the image decoding device (100) can obtain at least one of information on the shape of the reference coding unit and information on the size of the reference coding unit from the bitstream for each of the various data units. The process of determining at least one coding unit included in the square-shaped reference coding unit (2000) has been described above through the process of splitting the current coding unit (300) of FIG. 3, and the process of determining at least one coding unit included in the non-square-shaped reference coding unit (2002) has been described above through the process of splitting the current coding unit (400 or 450) of FIG. 4, so a detailed description thereof will be omitted.

[0325] According to one embodiment, the image decoding device (100) may use an index for identifying the size and shape of the reference coding unit in order to determine the size and shape of the reference coding unit according to some data units that are predetermined based on a predetermined condition. That is, the receiving unit (not shown) may obtain only an index for identifying the size and shape of the reference coding unit for each slice, slice segment, maximum coding unit, etc., among the various data units (e.g., sequences, pictures, slices, slice segments, maximum coding units, etc.) from the bitstream, as a data unit that satisfies a predetermined condition (e.g., a data unit having a size smaller than a slice). The image decoding device (100) may determine the size and shape of the reference data unit for each data unit that satisfies the predetermined condition by using the index. When information about the shape of the reference coding unit and information about the size of the reference coding unit are obtained from the bitstream for each relatively small-sized data unit and used, the efficiency of the bitstream may not be good. Therefore, instead of directly obtaining information about the shape of the reference coding unit and information about the size of the reference coding unit, only the index may be obtained and used. In this case, at least one of the size and shape of the reference coding unit corresponding to the index indicating the size and shape of the reference coding unit may be determined in advance. That is, the image decoding device (100) can determine at least one of the size and shape of the reference coding unit included in the data unit that serves as the basis for obtaining the index by selecting at least one of the sizes and shapes of the predetermined reference coding units according to the index.

[0326] According to one embodiment, the image decoding device (100) may use at least one reference coding unit included in one maximum coding unit. That is, a maximum coding unit for dividing an image may include at least one reference coding unit, and a coding unit may be determined through a recursive splitting process of each reference coding unit. According to one embodiment, at least one of the width and the height of the maximum coding unit may correspond to an integer multiple of at least one of the width and the height of the reference coding unit. According to one embodiment, the size of the reference coding unit may be a size obtained by splitting the maximum coding unit n times according to a quad tree structure. That is, the image decoding device (100) may determine the reference coding unit by splitting the maximum coding unit n times according to the quad tree structure, and may split the reference coding unit based on at least one of block shape information and information about a split shape mode according to various embodiments.

[0327] FIG. 16 illustrates a processing block that serves as a criterion for determining the order of determination of reference encoding units included in a picture (2100) according to one embodiment.

[0328] According to one embodiment, the image decoding apparatus (100) may determine at least one processing block for dividing a picture. The processing block is a data unit including at least one reference coding unit for dividing an image, and at least one reference coding unit included in the processing block may be determined in a specific order. That is, the determination order of at least one reference coding unit determined in each processing block may correspond to one of various types of orders in which the reference coding unit may be determined, and the determination order of the reference coding unit determined in each processing block may be different for each processing block. The determination order of the reference coding unit determined for each processing block may be one of various orders such as raster scan, Z-scan, N-scan, up-right diagonal scan, horizontal scan, and vertical scan, but the order in which it may be determined should not be interpreted as being limited to the above scan orders.

[0329] According to one embodiment, the image decoding device (100) can obtain information about the size of a processing block to determine the size of at least one processing block included in an image. The image decoding device (100) can obtain information about the size of a processing block from a bitstream to determine the size of at least one processing block included in an image. The size of the processing block may be a predetermined size of a data unit indicated by the information about the size of the processing block.

[0330] According to one embodiment, a receiving unit (not shown) of an image decoding device (100) can obtain information about the size of a processing block from a bitstream for each specific data unit. For example, information about the size of a processing block can be obtained from a bitstream in the form of data units such as an image, a sequence, a picture, a slice, a slice segment, etc. That is, the receiving unit (not shown) can obtain information about the size of a processing block from a bitstream for each of the above-described multiple data units, and the image decoding device (100) can determine the size of at least one processing block for dividing a picture using the obtained information about the size of the processing block, and the size of the processing block can be an integer multiple of a reference coding unit.

[0331] According to one embodiment, the image decoding device (100) may determine the size of a processing block (2102, 1612) included in a picture (2100). For example, the image decoding device (100) may determine the size of a processing block based on information about the size of the processing block obtained from a bitstream. Referring to FIG. 16, the image decoding device (100) may determine the horizontal size of the processing block (2102, 1612) to be four times the horizontal size of a reference coding unit, and the vertical size of the processing block (2102, 1612) to be four times the vertical size of the reference coding unit, according to one embodiment. The image decoding device (100) may determine the order in which at least one reference coding unit is determined within at least one processing block.

[0332] According to one embodiment, the video decoding device (100) may determine each processing block (2102, 1612) included in the picture (2100) based on the size of the processing block, and may determine the order of determining at least one reference coding unit included in the processing block (2102, 1612). According to one embodiment, determining the reference coding unit may include determining the size of the reference coding unit.

[0333] According to one embodiment, the image decoding device (100) can obtain information about a determination order of at least one reference coding unit included in at least one processing block from a bitstream, and can determine an order in which at least one reference coding unit is determined based on the obtained information about the determination order. The information about the determination order can be defined as an order or direction in which the reference coding units are determined within the processing block. That is, the order in which the reference coding units are determined can be independently determined for each processing block.

[0334] According to one embodiment, the image decoding device (100) can obtain information about the determination order of the reference coding unit for each specific data unit from the bitstream. For example, the receiving unit (not shown) can obtain information about the determination order of the reference coding unit for each data unit such as an image, sequence, picture, slice, slice segment, processing block, etc. from the bitstream. Since the information about the determination order of the reference coding unit indicates the determination order of the reference coding unit within the processing block, the information about the determination order can be obtained for each specific data unit including an integer number of processing blocks.

[0335] The image decoding device (100) can determine at least one reference encoding unit based on an order determined according to one embodiment.

[0336] According to one embodiment, a receiver (not shown) may obtain information about a reference coding unit determination order as information related to a processing block (2102, 1612) from a bitstream, and an image decoding device (100) may determine an order in which at least one reference coding unit included in the processing block (2102, 1612) is determined, and at least one reference coding unit included in the picture (2100) may be determined according to the determination order of the coding units. Referring to FIG. 16, the image decoding device (100) may determine an order in which at least one reference coding unit is determined (2104, 1614) related to each processing block (2102, 1612). For example, when information about the determination order of the reference coding unit is obtained for each processing block, the order in which the reference coding unit is determined for each processing block (2102, 1612) may be different for each processing block. If the reference encoding unit determination order (2104) related to the processing block (2102) is a raster scan order, the reference encoding unit included in the processing block (2102) can be determined according to the raster scan order. In contrast, if the reference encoding unit determination order (1614) related to another processing block (1612) is a reverse order of the raster scan order, the reference encoding unit included in the processing block (1612) can be determined according to the reverse order of the raster scan order.

[0337] According to one embodiment, the image decoding device (100) can decode at least one determined reference coding unit. The image decoding device (100) can decode an image based on the determined reference coding unit through the above-described embodiment. The method of decoding the reference coding unit may include various methods of decoding an image.

[0338] According to one embodiment, the video decoding device (100) may obtain and use block shape information indicating the shape of the current encoding unit or information on a partition shape mode indicating a method of partitioning the current encoding unit from a bitstream. The block shape information or the information on the partition shape mode may be included in a bitstream related to various data units. For example, the video decoding device (100) may use block shape information or information on the partition shape mode included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, and a tile group header. Furthermore, the video decoding device (100) may obtain and use a syntax element corresponding to block shape information or information on the partition shape mode from the bitstream for each maximum encoding unit, each reference encoding unit, and each processing block.

[0339] Referring to FIGS. 17 to 26, an image encoding device, an image decoding device, an image encoding method, and an image decoding method for encoding or decoding an image in which deblocking filtering is performed on the boundary of a restoration block of a block (encoding unit, prediction unit, or transformation unit) determined in various forms according to various embodiments are described.

[0340] FIGS. 17a to 17d are diagrams for explaining a process of performing deblocking filtering on the boundary of a restoration block according to various embodiments.

[0341] Referring to FIG. 17A, the image decoding device (100) can perform deblocking filtering on three pixels (1715) on both sides of a vertical block boundary (1710) in 8x8 units. When the image decoding device (100) allows only quad division among division types, and blocks of encoding units, prediction units, or transformation units are determined based on the division type, deblocking filtering can be performed on most block boundaries because, except for blocks of 4x4 size, the block boundaries are located only at points that are multiples of 8.

[0342] Referring to FIG. 17b, the image decoding device (100) can perform deblocking filtering on three pixels (1725) on both sides of a block boundary (1720) in units of 8x8. If the image decoding device (100) allows not only quad division but also tri division and binary division as available division types, blocks of sizes 8x4 and 16x4 can be determined, and in this case, deblocking filtering cannot be performed on the boundaries of some blocks.

[0343] Referring to FIG. 17c, the image decoding device (100) can perform deblocking filtering on all boundaries (1730, 1735) of 8x8 units. The image decoding device (100) can perform deblocking filtering on three pixels (1740) on both sides of the boundaries (1730, 1735) of 8x8 units. If the image decoding device (100) allows not only quad division but also tri division and binary division as available division types, blocks of 8x4 and 16x4 sizes can be determined, and in this case, deblocking filtering cannot be performed on the boundaries of some blocks, and deblocking filtering can be performed on the boundaries (1735) of 8x8 units that are not the boundaries of the blocks.

[0344] Referring to FIG. 17d, the image decoding device (100) can perform deblocking filtering on three pixels (1750) on both sides of a block boundary (1745) for each 4x4 unit. In this case, the pixel (1750) can be filtered twice by deblocking filtering of the block boundaries (1745) located on both sides. At this time, the deblocking filtering result value can vary depending on the deblocking filtering order when deblocking filtering the block boundary (1745), and therefore, since a dependency on the deblocking filtering application order occurs, it becomes difficult to perform deblocking filtering in parallel.

[0345] Figure 18 is a diagram for explaining a process of limiting the partitioning form mode of a block representing a trie partitioning type by considering the size of the unit performing deblocking filtering.

[0346] Referring to FIG. 18, when the image decoding device (100) divides a restoration block (1800) of 16x16 size based on the trie division type, 8x4 and 4x8 blocks are determined, and at this time, when deblocking filtering is performed at the block boundary in 8x8 units, deblocking filtering is not performed at the boundary of the intermediate block, so that the boundary of the block is not located at a point that is a multiple of 4 rather than a multiple of 8, the division shape mode indicating the vertical trie division type among the available block division modes of the restoration block (1800) can be limited, and the restoration block (1800) can be divided using one of the remaining available block division modes. By limiting the division shape mode, the image decoding device (100) can ensure that the boundary of the restoration block is located at the boundary of the unit on which deblocking filtering is performed, so that the deblocking filtering can be performed at the boundary of the restoration block.

[0347] Figures 19a to 19b are diagrams for explaining a process of limiting the partitioning form mode of a binary partition type block by considering the size of the unit for deblocking filtering.

[0348] Referring to FIG. 19A, when the image decoding device (100) divides a restoration block (1900) having a size of 8x16 based on the trie partitioning type, a block having a size of 4x16 is determined, and at this time, when deblocking filtering is performed at the block boundary in units of 8x8, deblocking filtering is not performed at the boundary of some blocks, so that the boundary of the block is not located at a point that is a multiple of 4 rather than a multiple of 8, the partitioning shape mode indicating the vertical binary partitioning type among the available partitioning shape modes of the restoration block (1900) can be limited, and the restoration block (1900) can be divided using one of the remaining available block partitioning modes. By limiting the partitioning shape mode, the image decoding device (100) ensures that the boundary of the restoration block is located at the boundary of the unit on which deblocking filtering is performed, so that the deblocking filtering can be performed at the boundary of the restoration block.

[0349] Referring to FIG. 19b, when the image decoding device (100) divides an 8x8 sized restoration block (1910) based on the trie partitioning type, a 4x8 sized block is determined, and at this time, when deblocking filtering is performed at the block boundary in 8x8 units, deblocking filtering is not performed at the boundary of some blocks, so that the boundary of the block is not located at a point that is a multiple of 4 rather than a multiple of 8, the partitioning shape mode indicating the vertical binary partitioning type among the available partitioning shape modes of the restoration block (1910) can be limited, and the restoration block (1910) can be divided using one of the remaining available block partitioning modes. By limiting the partitioning shape mode, the image decoding device (100) ensures that the boundary of the restoration block is located at the boundary of the unit on which deblocking filtering is performed, so that the deblocking filtering can be performed at the boundary of the restoration block.

[0350] As described with reference to FIGS. 19a and 19b, the image decoding device (100) restricts the partition shape mode so that the boundary of the restoration block is located at the boundary of the unit performing deblocking filtering, so that deblocking filtering can be performed at the boundary of the restoration block. However, the restricted partition shape mode is not limited thereto, and if the size of the block determined based on the partition shape mode is such that at least one height or width is a multiple of 4 rather than a multiple of 8, such as 8x4 or 16x4, the corresponding partition shape mode can be restricted.

[0351] FIGS. 20A and 20B are diagrams for explaining a process for determining the number of pixels whose pixel values ​​are changed by deblocking filtering at a block boundary by considering the size of the block, according to various embodiments.

[0352] Referring to FIG. 20a, when the image decoding device (100) performs deblocking filtering on the block boundary in units of rows for each 4x4 unit, if the width of one of the restoration blocks located on both sides of the vertical block boundary (2010) is 4, deblocking filtering is performed on two pixels (2020) located on both sides of the vertical block boundary (2010), and the pixel values ​​thereof may be changed.

[0353] Referring to FIG. 20b, when the image decoding device (100) performs deblocking filtering on the block boundary in units of rows for each 4x4 unit, if the width of one of the restoration blocks located on both sides of the vertical block boundary (2030) is 4, deblocking filtering is performed on one pixel (2040) located on both sides of the vertical block boundary (2030), and the pixel value may be changed.

[0354] As described with reference to FIGS. 20a and 20b, when the image decoding device (100) performs deblocking filtering in units of rows or columns for every 4x4 unit, the number of pixels whose pixel values ​​change according to deblocking filtering is adaptively determined based on the sizes of blocks located on both sides of the vertical (horizontal) boundaries of the reconstructed blocks, so that even if deblocking filtering is performed on adjacent boundaries in the same direction, pixels whose pixel values ​​change do not overlap each other, and thus, the dependency according to the deblocking filtering order on adjacent boundaries in the same direction can be eliminated. As a result, the image decoding device (100) can perform deblocking filtering in parallel on adjacent boundaries in the same direction.

[0355] FIGS. 21A and 21B are diagrams for explaining a process for determining the number of pixels whose pixel values ​​are changed by deblocking filtering at a block boundary by considering the sizes of blocks bordering both sides of the block boundary, according to various embodiments.

[0356] Referring to FIG. 21a, when the image decoding device (100) performs deblocking filtering on a row-by-row basis for block boundaries in every 4x4 unit, when the width of the blocks located on both sides of the restoration blocks located on both sides of the vertical block boundary (2100) is 4, the device may refer to two pixels (2120) on both sides of the vertical block boundary (2100) to apply deblocking filtering, and change the values ​​of the pixels.

[0357] When the video decoding device (100) performs deblocking filtering on a row-by-row basis for block boundaries in each 4x4 unit, if the width of the block located on the left side among the restoration blocks located on both sides of the vertical block boundary (2110) is 4, the device may refer to the block to apply deblocking filtering to two pixels to the left of the vertical block boundary (2110) and four pixels to the right, and may perform deblocking filtering on two pixels to the left of the vertical block boundary (2110) and three pixels (2130) to the right to change the values ​​of the pixels.

[0358] Referring to FIG. 21b, when the image decoding device (100) performs deblocking filtering on a row-by-row basis for block boundaries in each 4x4 unit, if the width of the blocks located on both sides of the vertical block boundary (2140) among the restoration blocks located on both sides of the vertical block boundary (2140) is 4, the device may refer to one pixel (2160) located on both sides of the vertical block boundary (2140) to apply deblocking filtering, and change the value of the pixel.

[0359] When the video decoding device (100) performs deblocking filtering on the block boundary in units of rows for each 4x4 unit, if the width of the block located on the left among the restoration blocks located on both sides of the vertical block boundary (2150) is 4, the device may refer to apply deblocking filtering to one pixel to the left of the vertical block boundary (2150) and four pixels to the right, and may perform deblocking filtering on one pixel to the left of the vertical block boundary (2150) and three pixels (2170) to the right to change the value of the pixel.

[0360] FIG. 22 is a diagram for explaining a process of determining the number of pixels whose pixel values ​​are changed by deblocking filtering at a block boundary or the number of pixels referenced by considering the sizes of blocks bordering both sides of the block boundary, according to various embodiments.

[0361] Referring to FIG. 22, when the image decoding device (100) performs deblocking filtering on a row-by-row basis for a 4x4 block boundary, if the width of the block located on the left side of the vertical block boundary (2210) is 4 and the width of the block located on the right side is 8, for the block located on the left side, two pixels (2220) on the left side of the vertical block boundary (2210) may be referenced and deblocking filtering may not be applied. For the block located on the right side, four pixels (2240) on the right side of the vertical block boundary (2210) may be referenced, and deblocking filtering may be performed on three pixels (2230) on the right side of the vertical block boundary (2210) so that the pixel values ​​thereof may be changed.

[0362] FIGS. 23a and 23b are diagrams for explaining a process in which an image decoding device performs deblocking filtering on the boundary of a block of a conversion unit according to various embodiments.

[0363] FIG. 23a is a diagram for explaining a process in which an image decoding device performs deblocking filtering on the boundary of a block of a conversion unit according to one embodiment.

[0364] Referring to FIG. 23a, the size of the encoding unit (2300) is 128x128, and at this time, if the maximum size of the transformation unit is 64, four 64x64 transformation units (2310) can be determined from the encoding unit (2300).

[0365] That is, if the size of the encoding unit is larger than the maximum size of the transformation unit, the encoding unit and the transformation unit do not have the same size, and the encoding unit may include multiple transformation units, and the image decoding device (100) may perform deblocking filtering on the boundary of the block of the transformation unit when the boundary of the encoding unit does not match the boundary of the transformation unit.

[0366] FIG. 23b is a diagram for explaining a process in which an image decoding device performs deblocking filtering on the boundary of a block of a conversion unit according to another embodiment.

[0367] If the maximum size of the transformation unit is 64, and if the size of the encoding unit (2340) is less than or equal to the maximum size of the transformation unit, the size of the encoding unit (2340) may be equal to the size of the transformation unit (2340). That is, the image decoding device (100) can perform deblocking filtering on the boundary of the transformation unit (2340). Therefore, compared to a case where the image decoding device (100) performs deblocking filtering on a block boundary of an 8x8 unit, the deblocking filtering can be performed even on a block boundary that does not match an 8x8 unit.

[0368] As described with reference to FIGS. 23a and 23b, the image decoding device (100) can perform deblocking filtering on the boundary of a transformation unit. However, the image decoding device (100) can determine whether there is no residual information in blocks located on both sides of the boundary of the transformation unit, and if it is determined that there is no residual information in blocks located on both sides of the boundary of the transformation unit, it can determine whether to perform deblocking filtering on the boundary of the transformation unit based on information about the block.

[0369] For example, the video decoding device (100) may determine to perform deblocking filtering on the boundary of the transformation unit when the motion vectors are different on both sides with respect to the boundary of the transformation unit. The video decoding device (100) may perform deblocking filtering on the boundary of the transformation unit when the mode for at least one block among the blocks on both sides with respect to the boundary of the transformation unit is an affine model based motion compensation mode or a predetermined mode such as a sub-block prediction mode. The video decoding device (100) may perform deblocking filtering on the boundary of the transformation unit when the intra prediction modes of the blocks on both sides with respect to the boundary of the transformation unit are different.

[0370] The image decoding device (100) can perform deblocking filtering based on the boundary of the transformation unit when the parameters of the illumination compensation are different on both sides of the boundary of the transformation unit. The image decoding device (100) can perform deblocking filtering on the boundary of the transformation unit when the modes of the blocks on both sides of the boundary of the transformation unit are different from each other. For example, the image decoding device (100) can perform deblocking filtering when the modes of the blocks on both sides of the boundary of the transformation unit are different from each other as inter mode / intra mode, combined inter-intra prediction mode / inter mode, or combined inter-intra prediction mode / intra mode.

[0371] FIGS. 24a to 24b are diagrams for explaining a process in which an image decoding device (100) performs deblocking filtering on blocks having a triangular partition shape according to various embodiments.

[0372] Referring to FIG. 24A, the image decoding device (100) may perform deblocking filtering on a block boundary (2410) if at least one block adjacent to the boundary is a block (2400) having triangular partitions. The image decoding device (100) may determine whether to perform deblocking filtering by considering residual information of blocks adjacent to both sides of the block boundary (2410). In addition, the image decoding device (100) may determine whether to perform deblocking filtering by considering the size of the height or width of blocks adjacent to both sides of the block boundary (2410), and the maximum or minimum value of the two values.

[0373] Referring to FIG. 24b, the image decoding device (100) may perform deblocking filtering on the boundary (2425) between triangular partitions when at least one block adjacent to the boundary is a block (2400) having triangular partitions. The image decoding device (100) may perform deblocking filtering on the boundary (2425) between triangular partitions when the height or width of the block (2400) is greater than or less than a specific height or width.

[0374] FIG. 25 is a diagram for explaining a process in which an image decoding device (100) performs bidirectional inter prediction on a block having a triangular partition according to one embodiment.

[0375] Referring to FIG. 25, when a block has a triangular partition shape, the image decoding device (100) may perform bi-directional inter prediction on the triangular partitions to generate a prediction block of the block. At this time, weights for the reference triangular partitions included in two bi-directional reference blocks (a first reference block and a second reference block) may be variously determined. For example, referring to FIG. 25, the weight of the first reference triangular partition (left partition) of the first reference block may be 0, the weight of the second reference triangular partition (right partition) of the first reference block may be 1, the weight of the first reference triangular partition (left partition) of the second reference block may be 1, and the weight of the second reference triangular partition (right partition) of the second reference block may be 0.

[0376] Alternatively, the weight of the first reference triangle partition of the first reference block may be 1 / 4, the weight of the second reference triangle partition of the first reference block may be 3 / 4, the weight of the first reference triangle partition of the second reference block may be 3 / 4, and the weight of the second reference triangle partition of the second reference block may be 1 / 4. In addition, the weights of various triangle partitions may be determined.

[0377] The weight of each reference triangular partition may be predetermined, but is not limited thereto, and the image decoding unit (110) may obtain the weight of each reference triangular partition from information about the weight included in the bitstream. At this time, the weight of the triangular partition may be determined as the weight of one of one or more weight candidates. At this time, index information indicating one of the one or more weight candidates may be obtained from the bitstream. The weight candidate may be determined for each block, but is not limited thereto, and may be determined for each reference block or for each reference triangular partition.

[0378] However, the block is not limited to having a triangular partition shape, and may have a partition mask shape including partitions of various shapes such as square. In this case, the shape of the partition mask of the block may be determined as one of one or more partition mask shape candidates. In this case, index information indicating one of the one or more mask shape candidates may be obtained from the bitstream.

[0379] The present disclosure has been described with a focus on various embodiments. Those skilled in the art will appreciate that the present disclosure can be implemented in modified forms without departing from its essential characteristics. Therefore, the disclosed embodiments should be considered illustrative rather than restrictive. The scope of the present disclosure is set forth in the claims, not the foregoing description, and all differences within the scope equivalent thereto should be construed as being encompassed by the present disclosure.

[0380] Meanwhile, the embodiments of the present disclosure described above can be written as computer-executable programs and implemented in a general-purpose digital computer that executes the programs using a computer-readable recording medium. The computer-readable recording medium includes storage media such as magnetic storage media (e.g., ROM, floppy disks, hard disks, etc.) and optical readable media (e.g., CD-ROMs, DVDs, etc.).

Claims

1. A step of hierarchically dividing the current image based on the segmentation form mode of the current image and determining a plurality of blocks within the current image; A step of generating prediction blocks of the blocks by performing prediction on the blocks; A step of generating residual blocks of the blocks based on information about the residuals of the blocks obtained from the bitstream; A step of generating restoration blocks for the blocks using the prediction blocks of the blocks and the residual blocks of the blocks; and A step of restoring the current image by performing deblocking filtering on the boundary of at least one block among the above restoration blocks, The step of restoring the current image by performing deblocking filtering on the boundary of at least one restoration block among the above restoration blocks is as follows: A video decoding method, characterized in that it comprises the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value, and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength, when the prediction mode for at least one restoration block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode.

2. In paragraph 1, The step of performing deblocking filtering on the boundary of at least one restoration block based on the value of the determined boundary filtering strength is: An image decoding method characterized by comprising a step of determining the number of pixels in at least one restoration block whose pixel value changes during deblocking filtering in units of rows or columns at a vertical boundary corresponding to the 4xN or a horizontal boundary corresponding to the Nx4 when the size of at least one restoration block is 4xN or Nx4 (where N is an integer greater than or equal to 4), as 1.

3. In paragraph 1, An image decoding method characterized in that the above predetermined value is 1 or 2.

4. In paragraph 1, A video decoding method, characterized in that the predetermined value is the same as a value of a boundary filtering strength used when the prediction mode for at least one block among blocks located on both sides of the boundary of at least one restoration block is an intra prediction mode.

5. In paragraph 1, A video decoding method, characterized in that the predetermined value is the same as the value of the boundary filtering strength used when the prediction mode of blocks located on both sides of the boundary of at least one restoration block is an inter prediction mode.

6. In paragraph 1, When the prediction mode for at least one block among the blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength is as follows: A video decoding method characterized in that, when the size of at least one block among blocks located on both sides of the boundary of at least one restoration block is greater than or equal to a predetermined size and the prediction mode for the at least one block is a combined inter-intra prediction mode, the value of the boundary filtering strength applied to the boundary of the at least one restoration block is determined to be a predetermined value.

7. In paragraph 1, When the prediction mode for at least one block among the blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength is as follows: A video decoding method characterized in that, when the size of at least one block among blocks located on both sides of the boundary of at least one restoration block is smaller than or equal to a predetermined size and the prediction mode for the at least one block is a combined inter-intra prediction mode, the value of the boundary filtering strength applied to the boundary of the at least one restoration block is determined to be a predetermined value.

8. In paragraph 1, An image decoding method, characterized in that the above-mentioned partitioning mode is a mode based on a partitioning type including one of quad partitioning, binary partitioning, and tri partitioning.

9. At least one processor for hierarchically dividing the current image based on a segmentation form mode of the current image to determine a plurality of blocks in the current image, performing prediction on the blocks to generate prediction blocks of the blocks, generating residual blocks of the blocks based on information about residuals of the blocks obtained from a bitstream, generating restoration blocks for the blocks using the prediction blocks of the blocks and the residual blocks of the blocks, and performing deblocking filtering on a boundary of at least one restoration block to restore the current image. When the at least one processor performs deblocking filtering on the boundary of the at least one restoration block to restore the current image, An image decoding device characterized in that, when the prediction mode for at least one block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode, the at least one processor determines a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value, and performs deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength.

10. In paragraph 9, An image decoding device, characterized in that the above predetermined value is 1 or 2.

11. In paragraph 9, An image decoding device, characterized in that the predetermined value is the same as a value of a boundary filtering strength used when the prediction mode for at least one block among blocks located on both sides of the boundary of at least one restoration block is an intra prediction mode.

12. In paragraph 9, An image decoding device, characterized in that the predetermined value is the same as the value of the boundary filtering strength used when the prediction mode of blocks located on both sides of the boundary of at least one restoration block is an inter prediction mode.

13. In paragraph 9, When the prediction mode of at least one processor is a combined inter-intra prediction mode for at least one block among blocks located on both sides of the boundary of the at least one restoration block, when determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength, An image decoding device characterized in that, when the size of at least one block among blocks located on both sides of the boundary of at least one restoration block is greater than or equal to a predetermined size and the prediction mode for the at least one block is a combined inter-intra prediction mode, the value of the boundary filtering strength applied to the boundary of the restoration block is determined to be a predetermined value.

14. In paragraph 9, When the at least one processor is a combined inter-intra prediction mode in which a prediction mode for at least one block among blocks located on both sides of the boundary of the restoration block is a combined inter-intra prediction mode, when determining a value of boundary filtering strength applied to the boundary of the restoration block as a predetermined value and performing deblocking filtering on the boundary of the restoration block based on the determined value of boundary filtering strength, An image decoding device characterized in that, when the size of at least one block among blocks located on both sides of the boundary of the restoration block is smaller than or equal to a predetermined size and the prediction mode for the at least one block is a combined inter-intra prediction mode, the value of the boundary filtering strength applied to the boundary of the restoration block is determined to be a predetermined value.

15. A step of hierarchically dividing the current image based on the segmentation form mode of the current image and determining a plurality of blocks within the image; A step of generating prediction blocks of the blocks by performing prediction on the blocks; A step of encoding residual blocks of the blocks based on predicted blocks of the blocks and original blocks; A step of generating restoration blocks for the blocks using the prediction blocks of the blocks and the encoded residual blocks; and A step of performing deblocking filtering on the boundary of at least one of the above restoration blocks, The step of performing deblocking filtering on the boundary of at least one restoration block is: A video encoding method, characterized in that it comprises the step of determining a value of boundary filtering strength applied to the boundary of the at least one restoration block as a predetermined value, and performing deblocking filtering on the boundary of the at least one restoration block based on the determined value of boundary filtering strength, when the prediction mode for at least one block among blocks located on both sides of the boundary of the at least one restoration block is a combined inter-intra prediction mode.

16. A computer-readable recording medium having recorded thereon a program for implementing the video decryption method of Article 1.