Video encoding method and apparatus and video decoding method and apparatus for performing post-reconstruction filtering in a constrained prediction mode

By using constrained intra prediction mode and fill value for post-reconstruction filtering in video encoding and decoding, the image quality degradation caused by uniform square encoding units in high-resolution images is solved, and more efficient image processing is achieved.

CN114245988BActive Publication Date: 2025-04-11SAMSUNG ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080057504.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-02-07
Filing Date
2020-06-22
Publication Date
2025-04-11
Estimated Expiration
2040-06-22

AI Technical Summary

Technical Problem

Prior Art In encoding and decoding of high resolution images, the use of uniform square encoding units leads to deterioration of the quality of the reconstructed image.

Method used

A video encoding and decoding method is provided, by obtaining information that constrains the intra prediction mode, generates a reconstruction sample of the current block, and performs post-reconstruction filtering using a padding value corresponding to the adjacent samples in the accessibility of adjacent blocks or constrained intra prediction mode.

Benefits of technology

In the constraint prediction mode, post-reconstruction filter failure due to low reliability of neighboring block information can be effectively prevented and image quality can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114245988B_ABST
    Figure CN114245988B_ABST
Patent Text Reader

Abstract

A video decoding method is provided, comprising: obtaining constraint prediction information indicating whether a constrained intra-frame prediction mode is enabled; generating a reconstructed sample of the current block by using a prediction sample of the current block and a residual sample of the current block; when the constrained intra-frame prediction mode is enabled by the constraint prediction information and a prediction mode of an adjacent block is not an intra-frame prediction mode, determining a padding value corresponding to an adjacent sample adjacent to the outside of a boundary between the current block and the adjacent block by using the reconstructed sample of the current block; and performing post-reconstruction filtering on the current block by using the padding value corresponding to the adjacent sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of encoding and decoding images. More specifically, the present disclosure relates to methods and devices for encoding and decoding videos by segmenting images into blocks of various shapes. Background Art

[0002] In a general compression method, a square coding unit is determined by a recursive partitioning process in which, while encoding the size of a coding unit, it is determined whether to partition a coding unit included in a picture, and then the coding unit is uniformly partitioned into four coding units of the same size. However, recently, for high-resolution images, image quality degradation of a reconstructed image caused by using coding units having a uniform square shape has become a problem. Therefore, a method and apparatus for partitioning a high-resolution image into coding units of various shapes have been proposed.

[0003] The present disclosure provides an encoding method and apparatus, and a decoding method and apparatus for efficiently signaling syntax elements regarding sizes of coding units of various shapes. Summary of the invention

[0004] Technical issues

[0005] According to an embodiment, a video encoding method and apparatus, or a video decoding method and apparatus, are provided, which determine padding values ​​corresponding to adjacent samples so that post-reconstruction filtering can be performed on a current block when accessibility to adjacent blocks is restricted or when in a constrained intra prediction mode.

[0006] Solution to the problem

[0007] According to an embodiment of the present disclosure, a video decoding method includes: obtaining constraint prediction information indicating whether a constrained intra-frame prediction mode is enabled; generating a reconstructed sample of the current block by using a prediction sample of the current block and a residual sample of the current block; when the constrained intra-frame prediction mode is enabled by the constraint prediction information and the prediction mode of the adjacent block is not an intra-frame prediction mode, determining adjacent samples outside the boundary between the adjacent current block and the adjacent block by using the reconstructed sample of the current block; and performing post-reconstruction filtering on the current block by using a padding value corresponding to the adjacent sample.

[0008] Disclosure of beneficial effects

[0009] According to various embodiments of the present disclosure, in a constrained prediction mode, when a neighboring block is unavailable or when a neighboring block is not reconstructed in an intra-frame prediction mode, post-reconstruction filtering can be performed on the current block by using sample values ​​of the current block instead of sample values ​​of the neighboring block. Therefore, by using information about neighboring blocks whose reliability of neighboring reconstructed samples is not high due to an unsatisfactory coding environment, post-reconstruction filtering can be fundamentally prevented from being performed on the current block.

[0010] However, according to an embodiment, effects achievable by a video encoding and decoding method and a video encoding and decoding device are not limited to those mentioned above, and other effects not mentioned can be clearly understood by a person of ordinary skill in the art from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] A brief description of each figure is provided to provide a better understanding of the drawings referenced herein.

[0012] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.

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

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

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

[0016] Figure 5 A process of splitting a coding unit based on at least one of block shape information or partition shape pattern information, performed by an image decoding device according to an embodiment, is illustrated.

[0017] Figure 6 A method of determining a specific coding unit from among odd-numbered coding units, performed by an image decoding device according to an embodiment, is illustrated.

[0018] Figure 7 FIG. 1 illustrates an order in which a plurality of coding units are processed when an image decoding apparatus determines a plurality of coding units by splitting a current coding unit according to an embodiment.

[0019] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units, performed by an image decoding device, is illustrated according to an embodiment when coding units are not processable in a specific order.

[0020] Fig. 9 A process of determining at least one coding unit by splitting a first coding unit, which is performed by an image decoding device according to an embodiment, is illustrated.

[0021] Fig.10 It is illustrated that when a second coding unit having a non-square shape determined when an image decoding device splits a first coding unit satisfies a specific condition, shapes into which the second coding unit can be split are restricted according to an embodiment.

[0022] Fig.11 A process of splitting a square coding unit performed by an image decoding apparatus when split shape pattern information cannot indicate that the square coding unit is split into four square coding units according to an embodiment is illustrated.

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

[0024] Fig.13 Illustrated is a process of determining a depth of a coding unit as a shape and a size of the coding unit change when the coding unit is recursively split so that a plurality of coding units are determined according to an embodiment.

[0025] Fig.14 FIG. 8 is a diagram illustrating a depth that may be determined based on a shape and a size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment.

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

[0027] Fig.16 It is a block diagram of an image encoding and decoding system.

[0028] Fig.17 An image decoding process including post-reconstruction filtering is illustrated.

[0029] Fig.18 The reference region for post-reconstruction filtering is illustrated.

[0030] Fig.19 is a block diagram of a video decoding apparatus according to an embodiment.

[0031] Fig. 20 is a flowchart of a video decoding method according to an embodiment.

[0032] Fig.21 is a block diagram of a video encoding apparatus according to an embodiment.

[0033] Fig. 22 is a flowchart of a video encoding method according to an embodiment.

[0034] Fig.23 A process of verifying the availability of neighboring samples adjacent to a current block according to an embodiment is illustrated.

[0035] Fig.24 A process of determining padding values ​​corresponding to neighboring samples based on availability of the neighboring samples for post-reconstruction filtering on a current block according to an embodiment is illustrated.

[0036] Fig.25 A process of determining padding values ​​corresponding to neighboring samples for post-reconstruction filtering on a current block based on availability of neighboring samples and a constrained prediction mode according to an embodiment is illustrated.

[0037] Fig.26 A pseudo code for defining intra prediction when a flag indicating a case of a normal intra prediction mode occurs according to an embodiment is illustrated.

[0038] Fig. 27 A pseudo code for defining intra prediction when an index indicating on / off states of remaining intra prediction modes other than a normal intra prediction mode appears according to another embodiment is illustrated.

[0039] Fig.28 A block size allowed to perform intra prediction is illustrated for each of various intra prediction modes.

[0040] Fig.29 Pseudo code for limiting a block size immediately before determining an intra prediction mode according to an embodiment is illustrated.

[0041] Fig.30 Pseudo code for limiting block intra size and normal intra prediction mode flag according to another embodiment is illustrated.

[0042] Fig.31 A pseudo code for limiting intra prediction to be performed only on blocks of a specific block size or smaller according to another embodiment is illustrated.

[0043] Best Mode

[0044] According to an embodiment of the present disclosure, a video decoding method includes: obtaining constraint prediction information indicating whether a constrained intra-frame prediction mode is enabled; generating a reconstructed sample of the current block by using a prediction sample of the current block and a residual sample of the current block; when the constrained intra-frame prediction mode is enabled by the constraint prediction information and the prediction mode of the adjacent block is not an intra-frame prediction mode, determining a padding value corresponding to an adjacent sample adjacent to the outside of a boundary between the current block and the adjacent block by using the reconstructed sample of the current block; and performing post-reconstruction filtering on the current block by using the padding value corresponding to the adjacent sample.

[0045] Generating the reconstructed samples of the current block may include: generating the prediction samples of the current block by performing prediction on the current block; and generating the residual samples of the current block by performing inverse transformation on the current block.

[0046] Determining padding values ​​corresponding to neighboring samples by using the reconstructed samples of the current block may include determining padding values ​​corresponding to neighboring samples located outside a boundary between the current block and the neighboring block to be the same as reconstructed sample values ​​of the current block adjacent to the boundary.

[0047] The video decoding method may further include: when samples of a neighboring block adjacent to the current block are unavailable for prediction of the current block, determining a padding value corresponding to a neighboring sample located outside a boundary between the current block and the neighboring block to be the same as a reconstructed sample value of the current block adjacent to the boundary.

[0048] Performing post-reconstruction filtering on the current block by using padding values ​​corresponding to neighboring samples may include performing 2×2 Hadamard transform domain filtering by using two reconstructed samples of the current block adjacent to a boundary and padding values ​​corresponding to two neighboring samples adjacent to the boundary.

[0049] Performing post-reconstruction filtering on the current block by using padding values ​​corresponding to neighboring samples may include performing bilateral filtering by using reconstructed samples of the current block adjacent to a boundary and padding values ​​corresponding to neighboring samples adjacent to the boundary.

[0050] The video decoding method may further include: performing prediction on a first block adjacent to the current block in an intra mode by using the reconstructed samples of the current block updated through post-reconstruction filtering; and performing in-loop filtering on the reconstructed samples of the current block updated through post-reconstruction filtering.

[0051] According to an embodiment of the present disclosure, a video decoding device includes: an acquirer configured to acquire constraint prediction information indicating whether a constrained intra-frame prediction mode is enabled; a reconstructor configured to generate a reconstructed sample of a current block by using a prediction sample of the current block and a residual sample of the current block; and a post-reconstruction filter configured to determine a padding value corresponding to a neighboring sample adjacent to outside a boundary between the current block and the neighboring block by using the reconstructed sample of the current block when the constrained intra-frame prediction mode is enabled by the constraint prediction information and the prediction mode of the neighboring block is not an intra-frame prediction mode, and to perform post-reconstruction filtering on the current block by using the padding value corresponding to the neighboring sample.

[0052] According to an embodiment of the present disclosure, a video encoding method includes: generating constrained prediction information indicating whether a constrained intra-frame prediction mode is enabled; generating reconstructed samples of the current block by using prediction samples of the current block and residual samples of the current block; when the constrained intra-frame prediction mode is enabled and the prediction mode of the adjacent block is not the intra-frame prediction mode, determining a padding value corresponding to an adjacent sample adjacent to the outside of a boundary between the current block and the adjacent block by using the reconstructed sample of the current block; and performing post-reconstruction filtering on the current block by using the padding value corresponding to the adjacent sample.

[0053] Generating the reconstructed samples of the current block may include: generating the prediction samples of the current block by performing prediction on the current block; and generating the residual samples of the current block by performing inverse transformation on the current block.

[0054] Determining padding values ​​corresponding to neighboring samples by using reconstructed samples of the current block may include determining padding values ​​corresponding to neighboring samples located outside a boundary between the current block and the neighboring block to be the same as reconstructed sample values ​​of the current block adjacent to the boundary.

[0055] The video encoding method may further include: when samples of a neighboring block adjacent to the current block are unavailable for prediction of the current block, determining a padding value corresponding to a neighboring sample located outside a boundary between the current block and the neighboring block to be the same as a reconstructed sample value of the current block adjacent to the boundary.

[0056] Performing post-reconstruction filtering on the current block by using padding values ​​corresponding to neighboring samples may include performing 2×2 Hadamard transform domain filtering by using two reconstructed samples of the current block adjacent to a boundary and padding values ​​corresponding to two neighboring samples adjacent to the boundary.

[0057] Performing post-reconstruction filtering on the current block by using padding values ​​corresponding to neighboring samples may include performing bilateral filtering by using reconstructed samples of the current block adjacent to a boundary and padding values ​​corresponding to neighboring samples adjacent to the boundary.

[0058] The video encoding method may further include: performing prediction on a first block adjacent to the current block in an intra mode by using the reconstructed samples of the current block updated through post-reconstruction filtering; and performing in-loop filtering on the reconstructed samples of the current block updated through post-reconstruction filtering.

[0059] A computer-readable recording medium has recorded thereon a program for implementing the video decoding method according to an embodiment of the present disclosure on a computer.

[0060] A computer-readable recording medium having recorded thereon a program for implementing the video encoding method according to an embodiment of the present disclosure on a computer. DETAILED DESCRIPTION

[0061] Since the present disclosure allows various changes and numerous examples, specific embodiments will be shown in the drawings and described in detail in the written description. However, this is not intended to limit the present disclosure to a particular mode of practice, and it should be understood that all changes, equivalents and substitutes that do not depart from the spirit and technical scope of the present disclosure are included in the present disclosure.

[0062] In the description of the embodiments, when it is considered that the specific detailed explanation of the related art may unnecessarily obscure the essence of the present disclosure, these detailed explanations are omitted. In addition, the numbers (e.g., first, second, etc.) used in the description of the specification are merely identification codes for distinguishing one element from another element.

[0063] Furthermore, in the present specification, it should be understood that when elements are “connected” or “coupled” to each other, the elements may be directly connected or coupled to each other, but may also be connected or coupled to each other through an intervening element, unless otherwise specified.

[0064] In this specification, with respect to an element represented as a "unit" or a "module", two or more elements may be combined into one element, or one element may be divided into two or more elements according to subdivided functions. In addition, in addition to its own main functions, each element described below may also perform some or all of the functions performed by another element, and some of the main functions of each element may be completely performed by another component.

[0065] Furthermore, in this specification, an “image” or a “picture” may refer to a still image or a moving image of a video, that is, the video itself.

[0066] In addition, in this specification, "sample" means data assigned to a sampling position of an image, that is, data to be processed. For example, a pixel value of an image in a spatial domain and a transform coefficient on a transform area can be a sample. A unit including at least one such sample can be defined as a block.

[0067] Also, in the present specification, a 'current block' may mean a block of a maximum coding unit, a coding unit, a prediction unit, or a transformation unit of a current image to be encoded or decoded.

[0068] In the present specification, a motion vector in the list 0 direction may mean a motion vector indicating a block in a reference picture included in list 0, and a motion vector in the list 1 direction may mean a motion vector indicating a block in a reference picture included in list 1. In addition, a motion vector in one direction may mean a motion vector indicating a block in a reference picture included in list 0 or list 1, and a motion vector in two directions may mean that a motion vector includes a motion vector in the list 0 direction and a motion vector in the list 1 direction.

[0069] In addition, in this specification, "binary split" of a block means a split for generating two sub-blocks, the width or height of the sub-block being half the width or height of the block. Specifically, when "binary vertical split" is performed on the current block, splitting is performed in the vertical direction (longitudinal direction) at half the width of the current block, and thus two sub-blocks having a width of half the width of the current block and the same height as the current block can be generated. When "binary horizontal split" is performed on the current block, splitting is performed in the horizontal direction (lateral direction) at half the height of the current block, and thus two sub-blocks having a height of half the height of the current block and the same width as the current block can be generated.

[0070] In addition, in the present specification, "ternary split" of a block means a split for generating three sub-blocks, the width or height of the sub-block being 1:2:1 of the width or height of the block. Specifically, when "ternary vertical split" is performed on the current block, splitting is performed in the vertical direction (longitudinal direction) at a point of 1:2:1 of the width of the current block, so that two sub-blocks having a width of 1 / 4 of the width of the current block and the same height as the current block, and one sub-block having a width of 2 / 4 of the width of the current block and the same height as the current block can be generated. When "ternary horizontal split" is performed on the current block, splitting is performed in the horizontal direction (lateral direction) at a point of 1:2:1 of the height of the current block, so that two sub-blocks having a height of 1 / 4 of the height of the current block and the same width as the current block, and one sub-block having a height of 2 / 4 of the height of the current block and the same width as the current block can be generated.

[0071] In addition, in this specification, "quad split" of a block means a split for generating four sub-blocks whose width and height are 1:1 of the width and height of the block. Specifically, when "quad split" is performed on the current block, splitting is performed in the vertical direction (longitudinal direction) at half the width of the current block, and splitting is performed in the horizontal direction (lateral direction) at half the height of the current block, so that four sub-blocks having a width of 1 / 2 the width of the current block and a height of 1 / 2 the height of the current block can be generated.

[0072] In the following, reference will be made to Figures 1 to 16 An image encoding device and an image decoding device, and an image encoding method and an image decoding method according to an embodiment are described. Figures 3 to 15 A method for determining a data unit of an image according to an embodiment is described, and reference will be made to Figures 16 to 31 A video encoding / decoding method according to an embodiment is described.

[0073] In the following, reference will be made to Figure 1 and Figure 2A method and apparatus for adaptive selection based on coding units of various shapes according to an embodiment of the present disclosure are described.

[0074] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.

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

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

[0077] Reference Figure 2 The operation of the image decoding device 100 is described in detail.

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

[0079] According to an embodiment of the present disclosure, the receiver 110 receives a bit stream.

[0080] The image decoding device 100 obtains a binary string corresponding to a segmentation shape pattern of a coding unit from a bitstream (operation 210). The image decoding device 100 determines a segmentation rule of the coding unit (operation 220). In addition, the image decoding device 100 segments the coding unit into a plurality of coding units based on at least one of the binary strings corresponding to the segmentation shape pattern or the segmentation rule (operation 230). The image decoding device 100 may determine an allowable first range of the size of the coding unit according to the aspect ratio of the coding unit in order to determine the segmentation rule. The image decoding device 100 may determine an allowable second range of the size of the coding unit according to the segmentation shape pattern of the coding unit in order to determine the segmentation rule.

[0081] Hereinafter, splitting of coding units will be described in detail according to an embodiment of the present disclosure.

[0082] First, a picture can be divided into one or more slices or one or more tiles. A slice or a tile can be a sequence of one or more maximum coding units (coding tree units (CTUs)). Compared with the maximum coding unit (CTU), there is a maximum coding block (coding tree block (CTB)) in concept.

[0083] A maximum coding unit (CTB) represents an N×N block (N is an integer) including N×N samples. Each color component can be partitioned into one or more maximum coding blocks.

[0084] When a picture includes three sample arrays (sample arrays of Y, Cr, and Cb components), the maximum coding unit (CTU) includes a maximum coding block of luma samples, two corresponding maximum coding blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When the picture is a monochrome picture, the maximum coding unit includes a maximum coding block of monochrome samples and a syntax structure for encoding monochrome samples. When the picture is a picture encoded in a color plane separated according to color components, the maximum coding unit includes a picture and a syntax structure for encoding picture samples.

[0085] One maximum coding block (CTB) may be partitioned into M×N coding blocks (M and N are integers) including M×N samples.

[0086] When a picture has sample arrays of Y, Cr, and Cb components, a coding unit (CU) includes a coding block of luma samples, two corresponding coding blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When a picture is a monochrome picture, a coding unit includes a coding block of monochrome samples and a syntax structure for encoding monochrome samples. When a picture is encoded in color planes separated according to color components, a coding unit includes a picture and a syntax structure for encoding picture samples.

[0087] As described above, the maximum coding block and the maximum coding unit are conceptually distinguished from each other, and the coding block and the coding unit are conceptually distinguished from each other. That is, the (maximum) coding unit refers to a data structure, which includes a (maximum) coding block containing corresponding samples and a grammatical structure corresponding to the (maximum) coding block. However, because a person of ordinary skill in the art understands that a (maximum) coding unit or a (maximum) coding block refers to a block of a specific size including a specific number of samples, the maximum coding block and the maximum coding unit, or the coding block and the coding unit are mentioned in the following description, unless otherwise specified, no distinction is made.

[0088] The image may be divided into maximum coding units (CTUs). The size of each maximum coding unit may be determined based on information obtained from the bitstream. The shape of each maximum coding unit may be a square shape of the same size. However, the present disclosure is not limited thereto.

[0089] For example, information about the maximum size of the luma coding block may be obtained from the bitstream. For example, the maximum size of the luma coding block indicated by the information about the maximum size of the luma coding block may be one of 4×4, 8×8, 16×16, 32×32, 64×64, 128×128, and 256×256.

[0090] For example, information about the luminance block size difference and the maximum size of the luminance coding block that can be divided into two can be obtained from the bitstream. The information about the luminance block size difference may refer to the size difference between the luminance maximum coding unit and the maximum luminance coding block that can be divided into two. Therefore, when the information about the maximum size of the luminance coding block that can be divided into two and the information about the luminance block size difference obtained from the bitstream are combined with each other, the size of the luminance maximum coding unit can be determined. The size of the chrominance maximum coding unit can be determined by using the size of the luminance maximum coding unit. For example, when the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chrominance block may be half the size of the luminance block, and the size of the chrominance maximum coding unit may be half the size of the luminance maximum coding unit.

[0091] According to an embodiment, since information about the maximum size of a binary-dividable luminance coding block is obtained from a bitstream, the maximum size of a binary-dividable luminance coding block may be variably determined. In contrast, the maximum size of a ternary-dividable luminance coding block may be fixed. For example, the maximum size of a ternary-dividable luminance coding block in an I-picture may be 32×32, and the maximum size of a ternary-dividable luminance coding block in a P-picture or a B-picture may be 64×64.

[0092] In addition, the maximum coding unit can be hierarchically divided into coding units based on the segmentation shape mode information obtained from the bitstream. At least one of information indicating whether to perform quadruple segmentation, information indicating whether to perform multiple segmentation, segmentation direction information, or segmentation type information can be obtained from the bitstream as the segmentation shape mode information.

[0093] For example, the information indicating whether to perform quad splitting may indicate whether the current coding unit is to be quad split (QUAD_SPLIT).

[0094] When the current coding unit is not quad-partitioned, the information indicating whether to perform multi-partitioning may indicate whether the current coding unit will no longer be split (NO_SPLIT) or will be binary / ternary split.

[0095] When the current coding unit is binary-partitioned or ternary-partitioned, the partition direction information indicates that the current coding unit is partitioned in one of a horizontal direction and a vertical direction.

[0096] When the current coding unit is partitioned in the horizontal direction or the vertical direction, the partition type information indicates whether the current coding unit is binary partitioned or ternary partitioned.

[0097] The split mode of the current coding unit may be determined according to the split direction information and the split type information. The split mode when the current coding unit is binary split in the horizontal direction may be determined as a binary horizontal split mode (SPLIT_BT_HOR), the split mode when the current coding unit is ternary split in the horizontal direction may be determined as a ternary horizontal split mode (SPLIT_TT_HOR), the split mode when the current coding unit is binary split in the vertical direction may be determined as a binary vertical split mode (SPLIT_BT_VER), and the split mode when the current coding unit is ternary split in the vertical direction may be determined as a ternary vertical split mode SPLIT_TT_VER.

[0098] The image decoding device 100 may obtain a binary string of segmentation shape mode information from a bit stream. The form of the bit stream received by the image decoding device 100 may include a fixed-length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. A binary string is information in a binary number. A binary string may include at least one bit. The image decoding device 100 may obtain segmentation shape mode information corresponding to the binary string based on a segmentation rule. The image decoding device 100 may determine whether to quadruplicate a coding unit, whether to not split a coding unit, a segmentation direction, and a segmentation type based on a binary string.

[0099] The coding unit may be smaller than or the same as the maximum coding unit. For example, since the maximum coding unit is a coding unit having the maximum size, the maximum coding unit is one of the coding units. When the segmentation shape pattern information about the maximum coding unit indicates that segmentation is not performed, the coding unit determined in the maximum coding unit has the same size as the size of the maximum coding unit. When the segmentation shape pattern information about the maximum coding unit indicates that segmentation is performed, the maximum coding unit may be segmented into coding units. In addition, when the segmentation shape pattern information about the coding unit indicates that segmentation is performed, the coding unit may be segmented into smaller coding units. However, segmentation of an image is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished. Reference will be made to Figures 3 to 16 The partitioning of coding units is described in detail.

[0100] In addition, one or more prediction blocks for prediction may be determined from the coding unit. A prediction block may be smaller than or the same as the coding unit. In addition, one or more transform blocks for transformation may be determined from the coding unit. A transform block may be smaller than or the same as the coding unit.

[0101] The shapes and sizes of the transform block and the prediction block may be unrelated to each other.

[0102] In another embodiment, prediction may be performed by using a coding unit as a prediction unit. In addition, transformation may be performed by using a coding unit as a transformation block.

[0103] Will refer to Figures 3 to 16 The segmentation of the coding unit is described in detail. The current block and the neighboring block of the present disclosure may indicate one of the maximum coding unit, the coding unit, the prediction block, and the transform block. In addition, the current block of the current coding unit is a block currently being decoded or encoded or a block currently being segmented. The neighboring block may be a block reconstructed before the current block. The neighboring block may be adjacent to the current block in space or time. The neighboring block may be located at one of the lower left, left side, upper left, top, upper right, right side, and lower right side of the current block.

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

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

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

[0107] When the width and height of the coding unit are different from each other (i.e., when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N), the image decoding device 100 may determine the block shape information of the coding unit as a non-square shape. When the shape of the coding unit is non-square, the image decoding device 100 may determine the aspect ratio among the block shape information of the coding unit as at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, or 32:1. In addition, the image decoding device 100 may determine whether the coding unit is in the horizontal direction or in the vertical direction based on the length of the width and the length of the height of the coding unit. In addition, the image decoding device 100 may determine the size of the coding unit based on at least one of the length of the width, the length of the height, or the area of ​​the coding unit.

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

[0109] The image decoding device 100 may obtain the segmentation shape pattern information from the bitstream. However, the embodiment is not limited thereto, and the image decoding device 100 and the image encoding device 2200 may determine the pre-agreed segmentation shape pattern information based on the block shape information. The image decoding device 100 may determine the pre-agreed segmentation shape pattern information about the maximum coding unit or the minimum coding unit. For example, the image decoding device 100 may determine the segmentation shape pattern information about the maximum coding unit as quad-partitioning. In addition, the image decoding device 100 may determine the segmentation shape pattern information about the minimum coding unit as "no segmentation". In particular, the image decoding device 100 may determine the size of the maximum coding unit to be 256×256. The image decoding device 100 may determine the pre-agreed segmentation shape pattern information as quad-partitioning. Quad-partitioning is a segmentation shape pattern in which both the width and height of the coding unit are divided into two. The image decoding device 100 may obtain a coding unit of 128×128 size from a maximum coding unit of 256×256 size based on the segmentation shape pattern information. In addition, the image decoding device 100 may determine the size of the minimum coding unit to be 4×4. The image decoding device 100 may obtain partition shape mode information indicating “no partition” with respect to the minimum coding unit.

[0110] According to an embodiment, the image decoding device 100 may use block shape information indicating that the current coding unit has a square shape. For example, the image decoding device 100 may determine whether to not split the square coding unit, whether to split the square coding unit vertically, whether to split the square coding unit horizontally, or whether to split the square coding unit into four coding units based on the split shape mode information. Figure 3 , when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 can determine that the coding unit 310a having the same size as the current coding unit 300 is not split based on the split shape mode information indicating no split, or can determine the split coding unit 310b, 310c, 310d, 310e or 310f based on the split shape mode information indicating a specific split method.

[0111] refer to Figure 3 According to an embodiment, the image decoding device 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that division is performed in the vertical direction. The image decoding device 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that division is performed in the horizontal direction. The image decoding device 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the division shape pattern information indicating that division is performed in the vertical and horizontal directions. According to an embodiment, the image decoding device 100 may determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that ternary division is performed in the vertical direction. The image decoding device 100 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that ternary division is performed in the horizontal direction. However, the division method of the square coding unit is not limited to the above method, and the division shape pattern information may indicate various methods. The specific segmentation method for segmenting the square coding unit will be described in detail below in conjunction with multiple embodiments.

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

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

[0114] According to an embodiment, the image decoding device 100 may determine a partitioning method of a coding unit by using partitioning shape pattern information, and in this case, the partitioning shape pattern information may indicate the number of one or more coding units generated by partitioning the coding unit. Figure 4 When the segmentation shape pattern information indicates that the current coding unit 400 or 450 is segmented into two coding units, the image decoding device 100 can determine the two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by segmenting the current coding unit 400 or 450 based on the segmentation shape pattern information.

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

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

[0117] According to an embodiment, the aspect ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the aspect ratio is 4:1, the block shape information may be in the horizontal direction because the length of the width is longer than the length of the height. When the aspect ratio is 1:4, the block shape information may be in the vertical direction because the length of the width is shorter than the length of the height. The image decoding device 100 may determine the current coding unit to be divided into an odd number of blocks based on the segmentation shape mode information. In addition, the image decoding device 100 may determine the segmentation direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is in the vertical direction, the image decoding device 100 may determine the coding units 430a to 430c by segmenting the current coding unit 400 in the horizontal direction. In addition, when the current coding unit 450 is in the horizontal direction, the image decoding device 100 may determine the coding units 480a to 480c by segmenting the current coding unit 450 in the vertical direction.

[0118] According to an embodiment, the image decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and not all determined coding units may have the same size. For example, a specific coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have a size different from that of other coding units 430a and 430c or 480a and 480c. That is, the coding units that may be determined by splitting the current coding unit 400 or 450 may have various sizes, and in some cases, all odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.

[0119] According to an embodiment, when the partition shape mode information indicates that the coding unit is partitioned into an odd number of blocks, the image decoding device 100 may determine the odd number of coding units included in the current coding unit 400 or 450, and further, may impose a specific restriction on at least one coding unit among the odd number of coding units generated by partitioning the current coding unit 400 or 450. Figure 4, the image decoding device 100 may set a decoding process for a coding unit 430b or 480b located at the center among three coding units 430a, 430b, and 430c or 480a, 480b, and 480c, which are generated when the current coding unit 400 or 450 is split into different parts from other coding units 430a and 430c or 480a or 480c. For example, unlike other coding units 430a and 430c or 480a and 480c, the image decoding device 100 may limit the coding unit 430b or 480b at the center position to no longer be split or to be split only a specific number of times.

[0120] Figure 5 A process of splitting a coding unit based on at least one of block shape information or partition shape pattern information, performed by an image decoding device according to an embodiment, is illustrated.

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

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

[0123] refer to Figure 5 , a specific coding unit (e.g., a coding unit at a center position or a square coding unit) from among the odd number of third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510 may be recursively divided. According to an embodiment, a square third coding unit 520b from among the odd number of third coding units 520b, 520c, and 520d may be divided into a plurality of fourth coding units in the horizontal direction. A non-square fourth coding unit 530b or 530d from among a plurality of fourth coding units 530a, 530b, 530c, and 530d may be divided into a plurality of coding units again. For example, a non-square fourth coding unit 530b or 530d may be divided into an odd number of coding units again. A method for recursively dividing coding units will be described below in conjunction with a plurality of embodiments.

[0124] According to an embodiment, the image decoding device 100 may divide each of the third coding unit 520a or 520b, 520c, and 520d into coding units based on the segmentation shape pattern information. In addition, the image decoding device 100 may determine not to divide the second coding unit 510 based on the segmentation shape pattern information. According to an embodiment, the image decoding device 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 may impose a specific restriction on a specific third coding unit from among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 may limit the third coding unit 520c at the center position from among the odd number of third coding units 520b, 520c, and 520d to no longer be divided or to be divided a set number of times.

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

[0126] According to an embodiment, the image decoding device 100 may obtain partition shape pattern information for partitioning the current coding unit from a specific position in the current coding unit.

[0127] Figure 6 A method of determining a specific coding unit from among odd-numbered coding units, performed by an image decoding device according to an embodiment, is illustrated.

[0128] refer to Figure 6 , the segmentation shape pattern information of the current coding unit 600 or 650 can be obtained from a sample at a specific position (e.g., a sample 640 or 690 at a center position) among a plurality of samples included in the current coding unit 600 or 650. However, the specific position in the current coding unit 600 from which at least one piece of segmentation shape pattern information can be obtained is not limited to Figure 6The image decoding device 100 may include the center position of the current coding unit 600, and may include various positions (e.g., top, bottom, left, right, upper left, lower left, upper right, and lower right positions) included in the current coding unit 600. The image decoding device 100 may obtain the segmentation shape mode information from a specific position, and may determine whether to segment the current coding unit into coding units of various shapes and sizes.

[0129] According to an embodiment, when the current coding unit is split into a certain number of coding units, the image decoding apparatus 100 may select one of the coding units. Various methods may be used to select one of the plurality of coding units, as will be described below in conjunction with a plurality of embodiments.

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

[0131] According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a center position from among the odd-numbered coding units using information indicating the positions of the odd-numbered coding units. Figure 6 , the image decoding device 100 may determine the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c by splitting the current coding unit 600 or the current coding unit 650. The image decoding device 100 may determine the middle coding unit 620b or the middle coding unit 660b by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. For example, the image decoding device 100 may determine the coding unit 620b of the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of specific samples included in the coding units 620a, 620b, and 620c. In detail, the image decoding device 100 may determine the coding unit 620b at the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c.

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

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

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

[0135] According to an embodiment, the image decoding device 100 may determine the width or height of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), the coordinates (xb, yb), and the coordinates (xc, yc), wherein the coordinates (xa, ya) are information indicating the position of the upper left sample 630a of the upper coding unit 620a, the coordinates (xb, yb) are information indicating the position of the upper left sample 630b of the middle coding unit 620b, and the coordinates (xc, yc) are information indicating the position of the upper left sample 630c of the lower coding unit 620c. The image decoding device 100 may determine the corresponding sizes of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the image decoding device 100 may determine the width of the upper coding unit 620a as the width of the current coding unit 600. The image decoding device 100 may determine the height of the upper coding unit 620a as yb-ya. According to an embodiment, the image decoding device 100 may determine the width of the intermediate coding unit 620b as the width of the current coding unit 600. The image decoding device 100 may determine the height of the intermediate coding unit 620b as yc-yb. According to an embodiment, the image decoding device 100 may determine the width or height of the lower coding unit 620c by using the width or height of the current coding unit 600 or the width or height of the upper coding unit 620a and the intermediate coding unit 620b. The image decoding device 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 620a to 620c. Reference Figure 6, the image decoding device 100 may determine the intermediate coding unit 620b having a size different from the sizes of the upper coding unit 620a and the lower coding unit 620c as the coding unit at a specific position. However, the above-mentioned method of determining a coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 corresponds only to an example of determining a coding unit at a specific position by using the size of the coding unit determined based on the coordinates of the sample, and thus various methods of determining a coding unit at a specific position by comparing the size of the coding unit determined based on the coordinates of a specific sample may be used.

[0136] The image decoding device 100 may determine the width or height of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd) as information indicating the position of the upper left sample 670a of the left coding unit 660a, the coordinates (xe, ye) as information indicating the position of the upper left sample 670b of the middle coding unit 660b, and the coordinates (xf, yf) as information indicating the position of the upper left sample 670c of the right coding unit 660c. The image decoding device 100 may determine the respective sizes of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the coding units 660a, 660b, and 660c.

[0137] According to an embodiment, the image decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width of the middle coding unit 660b as xf-xe. The image decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 600. According to an embodiment, the image decoding device 100 may determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 or the width or height of the left coding unit 660a and the middle coding unit 660b. The image decoding device 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 660a to 660c. Reference Figure 6, the image decoding device 100 may determine the middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as the coding unit at a specific position. However, the above-mentioned method of determining a coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 corresponds only to an example of determining a coding unit at a specific position by using the size of the coding unit determined based on the coordinates of the sample, and thus various methods of determining a coding unit at a specific position by comparing the size of the coding unit determined based on the coordinates of the specific sample may be used.

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

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

[0140] According to an embodiment, the image decoding device 100 may use information indicating the corresponding positions of the even-numbered coding units to determine the coding unit at a specific position from among the even-numbered coding units. The image decoding device 100 may determine the even-numbered coding units by splitting (binary splitting) the current coding unit, and may determine the coding unit at the specific position by using information about the positions of the even-numbered coding units. Operations related thereto may correspond to operations of determining the coding unit at a specific position (e.g., a center position) from among the odd-numbered coding units, which have been referred to above. Figure 6 Detailed description has been given, so a detailed description thereof is not provided here.

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

[0142] refer to Figure 6 , the image decoding device 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the segmentation shape pattern information, and may determine the coding unit 620b at the center position from among the plurality of coding units 620a, 620b, and 620c. In addition, the image decoding device 100 may determine the coding unit 620b at the center position, taking into account the position from which the segmentation shape pattern information is obtained. That is, the segmentation shape pattern information of the current coding unit 600 may be obtained from the sample 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the segmentation shape pattern information, the coding unit 620b including the sample 640 may be determined as the coding unit at the center position. However, the information for determining the coding unit at the center position is not limited to the segmentation shape pattern information, and various types of information may be used to determine the coding unit at the center position.

[0143] According to an embodiment, specific information for identifying a coding unit at a specific position may be obtained from a specific sample included in the coding unit to be determined. Figure 6 , the image decoding device 100 may use the segmentation shape pattern information obtained from the sample at the specific position in the current coding unit 600 (for example, the sample at the center position of the current coding unit 600) to determine the coding unit at the specific position (for example, the coding unit at the center position among the multiple segmented coding units) from among the multiple coding units 620a, 620b, and 620c determined by segmenting the current coding unit 600. That is, the image decoding device 100 may determine the sample at the specific position by considering the block shape of the current coding unit 600, determine the coding unit 620b including the sample from which specific information (for example, the segmentation shape pattern information) can be obtained, and may impose specific restrictions on the coding unit 620b. Reference Figure 6According to an embodiment, the image decoding device 100 may determine the sample 640 at the center position of the current coding unit 600 as a sample from which specific information can be obtained, and may impose a specific restriction on the coding unit 620b including the sample 640 in the decoding operation. However, the position of the sample from which specific information can be obtained is not limited to the above-mentioned position, and may include an arbitrary position of the sample included in the coding unit 620b determined for restriction.

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

[0145] According to an embodiment, when the current coding unit is split into a plurality of coding units, the image decoding device 100 may use the split shape pattern information to determine a coding unit at a specific position from among the plurality of coding units. According to an embodiment, the image decoding device 100 may obtain the split shape pattern information from a sample at a specific position in the coding unit, and split a plurality of coding units generated by splitting the current coding unit by using the split shape pattern information obtained from the sample at the specific position in each of the plurality of coding units. That is, the coding units may be recursively split based on the split shape pattern information obtained from the sample at the specific position in each of the plurality of coding units. As has been mentioned above, Figure 5 An operation of recursively splitting the coding unit is described, and thus a detailed description thereof will not be provided here.

[0146] According to an embodiment, the image decoding device 100 may determine one or more coding units by splitting a current coding unit, and may determine an order of decoding the one or more coding units based on a specific block (eg, the current coding unit).

[0147] Figure 7 Illustration of an order of processing a plurality of coding units when an image decoding device determines a plurality of coding units by splitting a current coding unit according to an embodiment.

[0148] According to an embodiment, the image decoding device 100 can determine the second coding units 710a and 710b by splitting the first coding unit 700 in a vertical direction, determine the second coding units 730a and 730b by splitting the first coding unit 700 in a horizontal direction, or determine the second coding units 750a to 750d by splitting the first coding unit 700 in both vertical and horizontal directions based on the segmentation shape pattern information.

[0149] refer to Figure 7 , the image decoding device 100 may determine to process the second coding units 710a and 710b determined by splitting the first coding unit 700 in the vertical direction in a horizontal direction order 710c. The image decoding device 100 may determine to process the second coding units 730a and 730b determined by splitting the first coding unit 700 in the horizontal direction in a vertical direction order 730c. The image decoding device 100 may determine to process the second coding units 750a to 750d determined by splitting the first coding unit 700 in the vertical and horizontal directions in a specific order for processing the coding units in a row and then processing the coding units in the next row (for example, in a raster scan order or a Z scan order 750e).

[0150] According to an embodiment, the image decoding apparatus 100 may recursively split the coding unit. Figure 7 , the image decoding device 100 may determine a plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d by splitting the first coding unit 700, and recursively split each of the determined plurality of coding units 710b, 730a and 730b, or 750a to 750d. The splitting method of the plurality of coding units 710b, 730a and 730b, or 750a to 750d may correspond to the splitting method of the first coding unit 700. In this way, each of the plurality of coding units 710b, 730a and 730b, or 750a to 750d may be independently split into a plurality of coding units. Reference Figure 7 , the image decoding device 100 may determine the second coding units 710a and 710b by splitting the first coding unit 700 in the vertical direction, and may determine whether to split or not split each of the second coding units 710a and 710b independently.

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

[0152] According to an embodiment, the processing order of the coding units may be determined based on the operation of splitting 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 being split. The image decoding device 100 may determine the processing order of the third coding units 720a and 720b determined by splitting the left second coding unit 710a independently of the right second coding unit 710b. Since the third coding units 720a and 720b are determined by splitting the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b may be processed in a vertical direction order 720c. Since the left second coding unit 710a and the right second coding unit 710b are processed in a horizontal direction order 710c, the right second coding unit 710b may be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in a vertical direction order 720c. The operation of determining the processing order of coding units based on the coding units before being split is not limited to the above example, and various methods may be used to independently process coding units split and determined into various shapes in a specific order.

[0153] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units, performed by an image decoding apparatus, is illustrated when coding units are not processable in a predetermined order according to an embodiment.

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

[0155] According to an embodiment, the image decoding device 100 may determine whether any coding unit is split into an odd number of coding units by determining whether the third coding units 820a and 820b and 820c to 820e are processable in a specific order. Figure 8, the image decoding device 100 may determine the third coding units 820a and 820b and 820c to 820e by recursively dividing the first coding unit 800. The image decoding device 100 may determine whether any one of the first coding unit 800, the second coding units 810a and 810b, and the third coding units 820a and 820b and 820c to 820e is divided into an odd number of coding units based on at least one of the block shape information or the division shape mode information. For example, the right second coding unit 810b among the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the multiple coding units included in the first coding unit 800 can be a specific order (for example, a Z scan order 830), and the image decoding device 100 can determine whether the third coding units 820c, 820d and 820e determined by splitting the right second coding unit 810b into an odd number of coding units meet the conditions for processing in a specific order.

[0156] According to an embodiment, the image decoding device 100 may determine whether the third coding units 820a and 820b and 820c to 820e included in the first coding unit 800 satisfy a condition for processing in a specific order, and the condition relates to whether at least one of the width or height of the second coding units 810a and 810b is divided into two halves along the boundary of the third coding units 820a and 820b and 820c to 820e. For example, the third coding units 820a and 820b determined when the height of the left second coding unit 810a of a non-square shape is divided into two halves may satisfy the condition. It may be determined that the third coding units 820c to 820e do not satisfy the condition because the boundary of the third coding units 820c to 820e determined when the right second coding unit 810b is divided into three coding units cannot divide the width or height of the right second coding unit 810b into two halves. When the condition is not satisfied as described above, the image decoding device 100 may determine the disconnection of the scanning order, and may determine that the right second coding unit 810b is divided into an odd number of coding units based on the result of the determination. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 may impose specific restrictions on the coding units at certain positions from among the divided coding units. The restrictions or specific positions have been described above in conjunction with multiple embodiments, so a detailed description thereof is not provided.

[0157] Fig. 9 A process of determining at least one coding unit by splitting a first coding unit, which is performed by an image decoding device according to an embodiment, is illustrated.

[0158] According to an embodiment, the image decoding device 100 may split the first coding unit 900 based on the split shape pattern information obtained by the receiver 110. The square first coding unit 900 may be split into four square coding units, or may be split into a plurality of non-square coding units. Fig. 9 , when the segmentation shape pattern information indicates that the first coding unit 900 is segmented into non-square coding units, the image decoding device 100 may segment the first coding unit 900 into a plurality of non-square coding units. In detail, when the segmentation shape pattern information indicates that an odd number of coding units is determined by segmenting the first coding unit 900 in a horizontal direction or a vertical direction, the image decoding device 100 may segment the square first coding unit 900 into an odd number of coding units, for example, second coding units 910a, 910b, and 910c determined by segmenting the square first coding unit 900 in a vertical direction, or second coding units 920a, 920b, and 920c determined by segmenting the square first coding unit 900 in a horizontal direction.

[0159] According to an embodiment, the image decoding device 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition for processing in a specific order, and the condition relates to whether at least one of the width or height of the first coding unit 900 is split into two halves along the boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Fig. 9 , because the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in the vertical direction do not divide the width of the first coding unit 900 into two halves, it can be determined that the first coding unit 900 does not meet the condition for processing in a specific order. In addition, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction do not divide the width of the first coding unit 900 into two halves, it can be determined that the first coding unit 900 does not meet the condition for processing in a predetermined order. When the condition is not satisfied as described above, the image decoding device 100 may decide the disconnection of the scanning order, and may determine that the first coding unit 900 is divided into an odd number of coding units based on the result of the decision. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 may impose a specific restriction on the coding unit at a specific position from among the divided coding units. The restriction or specific position has been described above in conjunction with multiple embodiments, and thus a detailed description thereof is not provided.

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

[0161] refer to Fig. 9 , the image decoding apparatus 100 may split the square first coding unit 900 or the non-square first coding unit 930 or 950 into coding units of various shapes.

[0162] Fig.10 It is illustrated that when a second coding unit having a non-square shape determined when an image decoding device splits a first coding unit satisfies a specific condition, shapes into which the second coding unit can be split are restricted according to an embodiment.

[0163] According to an embodiment, the image decoding device 100 may determine to split the square first coding unit 1000 into the non-square second coding units 1010a and 1010b or 1020a and 1020b based on the split shape pattern information obtained by the receiver 110. The second coding units 1010a and 1010b or 1020a and 1020b may be split independently. In this way, the image decoding device 100 may determine whether to split each of the second coding units 1010a and 1010b or 1020a and 1020b into a plurality of coding units based on the split shape pattern information of each of the second coding units 1010a and 1010b or 1020a and 1020b. According to an embodiment, the image decoding device 100 may determine the third coding units 1012a and 1012b by splitting the non-square left second coding unit 1010a determined by splitting the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the left second coding unit 1010a is split in the horizontal direction, the image decoding device 100 may restrict the right second coding unit 1010b from being split in the horizontal direction in which the left second coding unit 1010a is split. When the third coding units 1014a and 1014b are determined by splitting the right second coding unit 1010b in the same direction, since the left second coding unit 1010a and the right second coding unit 1010b are independently split in the horizontal direction, the third coding units 1012a and 1012b or 1014a and 1014b may be determined. However, this case is also used as the case where the image decoding device 100 splits the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on the split shape pattern information, and may be inefficient in image decoding.

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

[0165] Fig.11 A process of splitting a square coding unit performed by an image decoding apparatus when split shape pattern information cannot indicate that the square coding unit is split into four square coding units according to an embodiment is illustrated.

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

[0167] According to an embodiment, the image decoding device 100 may independently split the non-square second coding units 1110a and 1110b or 1120a and 1120b, etc. Each of the second coding units 1110a and 1110b or 1120a and 1120b, etc. may be recursively split in a specific order, and the splitting method may correspond to the method of splitting the first coding unit 1100 based on the split shape pattern information.

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

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

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

[0171] According to an embodiment, the image decoding device 100 may split the first coding unit 1200 based on the segmentation shape mode information. When the block shape indicates a square shape and the segmentation shape mode information indicates that the first coding unit 1200 is split in at least one of the horizontal direction or the vertical direction, the image decoding device 100 may determine the second coding units 1210a and 1210b or 1220a and 1220b, etc. by splitting the first coding unit 1200. Fig.12, the non-square second coding units 1210a and 1210b or 1220a and 1220b determined by splitting the first coding unit 1200 only in the horizontal direction or the vertical direction can be independently split based on the split shape pattern information of each coding unit. For example, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c, and 1216d by splitting the second coding units 1210a and 1210b generated by splitting the first coding unit 1200 in the vertical direction in the horizontal direction, and can determine the third coding units 1226a, 1226b, 1226c, and 1226d by splitting the second coding units 1220a and 1220b generated by splitting the first coding unit 1200 in the horizontal direction in the horizontal direction. The above has been referred to Fig.11 An operation of splitting the second coding units 1210a and 1210b or 1220a and 1220b is described, and thus a detailed description thereof will not be provided herein.

[0172] According to an embodiment, the image decoding apparatus 100 may process the coding units in a specific order. Figure 7 The operation of processing the coding units in a predetermined order is described, and thus a detailed description thereof will not be provided herein. Fig.12 , the image decoding device 100 may determine four square third coding units 1216a, 1216b, 1216c and 1216d, and 1226a, 1226b, 1226c and 1226d by dividing the square first coding unit 1200. According to an embodiment, the image decoding device 100 may determine the processing order of the third coding units 1216a, 1216b, 1216c and 1216d, and 1226a, 1226b, 1226c and 1226d based on the division method of the first coding unit 1200.

[0173] According to an embodiment, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c and 1216d by splitting the second coding units 1210a and 1210b generated by splitting the first coding unit 1200 in the vertical direction in the horizontal direction, and can process the third coding units 1216a, 1216b, 1216c and 1216d in the processing order 1217 for initially processing the third coding units 1216a and 1216c included in the left second coding unit 1210a, and then process the third coding units 1216b and 1216d included in the right second coding unit 1210b in the vertical direction.

[0174] According to an embodiment, the image decoding device 100 can determine the third coding units 1226a, 1226b, 1226c and 1226d by splitting the second coding units 1220a and 1220b generated by splitting the first coding unit 1200 in the horizontal direction in the vertical direction, and can process the third coding units 1226a, 1226b, 1226c and 1226d in the processing order 1227 for initially processing the third coding units 1226a and 1226b included in the upper second coding unit 1220a, and then process the third coding units 1226c and 1226d included in the lower second coding unit 1220b in the horizontal direction.

[0175] refer to Fig.12 , the square third coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d can be determined by dividing the second coding units 1210a and 1210b and 1220a and 1220b, respectively. Although the second coding units 1210a and 1210b are determined by dividing the first coding unit 1200 in the vertical direction, which is different from the second coding units 1220a and 1220b determined by dividing the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d divided therefrom ultimately show the same shape of coding units divided from the first coding unit 1200. In this way, by recursively splitting the coding units in different ways based on the split shape pattern information, even when the coding units are finally determined to be the same shape, the image decoding device 100 can process a plurality of coding units in different orders.

[0176] Fig.13 Illustrated is a process of determining a depth of a coding unit as a shape and a size of the coding unit change when the coding unit is recursively split so that a plurality of coding units are determined according to an embodiment.

[0177] According to an embodiment, the image decoding device 100 may determine the depth of the coding unit based on a specific criterion. For example, the specific criterion may be the length of the long side of the coding unit. When the length of the long side of the coding element before segmentation is 2n times (n>0) the length of the long side of the current coding unit segmented, the image decoding device 100 may determine that the depth of the current coding unit is increased by n from the depth of the coding unit before segmentation. In the following description, a coding unit with an increased depth is represented as a coding unit of a deeper depth.

[0178] refer to Fig.13According to an embodiment, the image decoding device 100 may determine the second coding unit 1302 and the third coding unit 1304 of a deeper depth by dividing the square first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may be expressed as '0: SQUARE'). Assuming that the size of the square first coding unit 1300 is 2N×2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by 1 / 2 may have an N×N size. In addition, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 by 1 / 2 may have a size of N / 2×N / 2. In this case, the width and height of the third coding unit 1304 are 1 / 4 times that of the first coding unit 1300. When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302 whose width and height are 1 / 2 times the width and height of the first coding unit 1300 may be D+1, and the depth of the third coding unit 1304 whose width and height are 1 / 4 times the width and height of the first coding unit 1300 may be D+2.

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

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

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

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

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

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

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

[0186] According to an embodiment, the width and height of the third coding unit 1314 or 1324 may be 1 / 4 times the width and height of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322 whose width and height are 1 / 2 times the width and height of the first coding unit 1310 or 1320 may be D+1, and the depth of the third coding unit 1314 or 1324 whose width and height are 1 / 4 times the width and height of the first coding unit 1310 or 1320 may be D+2.

[0187] Fig.14 FIG. 4 illustrates a depth that may be determined based on a shape and a size of a coding unit, and a partial index (PID) for distinguishing coding units according to an embodiment.

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

[0189] According to an embodiment, the depth of the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d determined based on the segmentation shape mode information of the square first coding unit 1400 can be determined based on the length of its long side. For example, because the length of the side of the square first coding unit 1400 is equal to the length of the long side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b may have the same depth, for example, D. However, when the image decoding device 100 divides the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c and 1406d based on the segmentation shape pattern information, because the length of the side of the square second coding units 1406a, 1406b, 1406c and 1406d is 1 / 2 times the length of the side of the first coding unit 1400, the depth of the second coding units 1406a, 1406b, 1406c and 1406d can be D+1, which is deeper than the depth D of the first coding unit 1400 by 1.

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

[0191] According to an embodiment, the depth of the second coding units 1412a and 1412b and 1414a, 1414b and 1414c or 1422a and 1422b and 1424a, 1424b and 1424c determined based on the segmentation shape mode information of the non-square first coding unit 1410 or 1420 may be determined based on the length of its long side. For example, since the length of the side of the square second coding units 1412a and 1412b is 1 / 2 times the length of the long side of the first coding unit 1410 having a non-square shape whose height is longer than the width, the depth of the square second coding units 1412a and 1412b is D+1 which is deeper than the depth D of the non-square first coding unit 1410 by 1.

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

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

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

[0195] According to an embodiment, the image decoding device 100 may determine a coding unit at a specific position from among the segmented coding units by using a PID for distinguishing coding units. According to an embodiment, when the segmentation shape mode information of the first coding unit 1410 having a rectangular shape and a height longer than a width indicates that the coding unit is segmented into three coding units, the image decoding device 100 may segment the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding device 100 may assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding device 100 may compare the PIDs of the odd-numbered segmented coding units to determine a coding unit at a center position from among the coding units. The image decoding device 100 may determine the coding unit 1414b having a PID corresponding to an intermediate value among the PIDs of the coding units as a coding unit at a center position from among the coding units determined by segmenting the first coding unit 1410. According to an embodiment, when the split coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for distinguishing the split coding units based on a size ratio between the coding units. Fig.14, the coding unit 1414b generated by dividing the first coding unit 1410 may have a width equal to that of the other coding units 1414a and 1414c and a height twice that of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c located next to the coding unit 1414b may increase by 2, and thus may be 3. When the PID does not increase uniformly as described above, the image decoding device 100 may determine that the coding unit is divided into a plurality of coding units including coding units having sizes different from other coding units. According to an embodiment, when the segmentation shape mode information indicates that the coding unit is divided into an odd number of coding units, the image decoding device 100 may divide the current coding unit in such a manner that a coding unit at a specific position among the odd number of coding units (e.g., a coding unit at the center position) has a size different from that of other coding units. In this case, the image decoding device 100 may determine the coding units at the center position having different sizes by using the PIDs of the coding units. However, the PID and the size or the position of the coding unit at a specific position are not limited to the above-mentioned examples, and a plurality of PIDs and a plurality of positions and sizes of the coding unit may be used.

[0196] According to an embodiment, the image decoding device 100 may use a specific data unit in which a coding unit starts to be recursively split.

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

[0198] According to an embodiment, a specific data unit may be defined as a data unit in which a coding unit begins to be recursively split by using segmentation shape pattern information. That is, the data unit may correspond to a coding unit of a maximum depth, which is used to determine a plurality of coding units split from a current picture. In the following description, for ease of explanation, a specific data unit is referred to as a reference data unit.

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

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

[0201] According to an embodiment, the image decoding device 100 may first determine the minimum size allowed by the reference data unit included in the current picture. Therefore, the image decoding device 100 may determine a plurality of reference data units having a size equal to or greater than the minimum size, and may determine one or more coding units using the partition shape mode information by referring to the determined reference data unit.

[0202] refer to Fig.15 , the image decoding apparatus 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined based on various data units that can include one or more reference coding units (e.g., a sequence, a picture, a slice, a segment, a tile, a tile group, a maximum coding unit, etc.).

[0203] According to an embodiment, the receiver 110 of the image decoding device 100 may obtain at least one of reference coding unit shape information or reference coding unit size information about each of a plurality of data units from a bitstream. Figure 3 The operation of the current coding unit 300 of the square reference coding unit 1500 is described as the operation of dividing the square reference coding unit 1500 into one or more coding units, and the above has been about the division Figure 4 The operation of the current coding unit 400 or 450 describes the operation of splitting the non-square reference coding unit 1502 into one or more coding units. Therefore, a detailed description thereof is not provided again.

[0204] According to an embodiment, the image decoding device 100 may use a PID for identifying the size and shape of a reference coding unit to determine the size and shape of a reference coding unit according to some data units previously determined based on a specific condition. That is, the receiver 110 may obtain from the bitstream only the PID for identifying the size and shape of each slice, segment, tile, tile group, or maximum coding unit of a data unit that satisfies a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among a plurality of data units (e.g., a sequence, a picture, a slice, a segment, a tile, a tile group, a maximum coding unit, etc.). The image decoding device 100 may determine the size and shape of a reference data unit for each data unit that satisfies a specific condition by using the PID. When the reference coding unit shape information and the reference coding unit size information are obtained and used from the bitstream according to each data unit having a relatively small size, the efficiency of using the bitstream may not be high, and therefore, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the reference coding unit size information. In this case, at least one of the size or shape of the reference coding unit corresponding to the PID for identifying the size and shape of the reference coding unit may be determined first. That is, the image decoding device 100 may determine at least one of sizes or shapes of reference coding units included in a data unit serving as a unit for obtaining a PID by selecting at least one of sizes or shapes of previously determined reference coding units based on the PID.

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

[0206] According to an embodiment, the image decoding device 100 may obtain block shape information indicating the shape of the current coding unit or segmentation shape mode information indicating the segmentation method of the current coding unit from the bitstream, and may use the obtained information. The segmentation shape mode information may be included in a bitstream associated with a plurality of data units. For example, the image decoding device 100 may use segmentation shape mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a fragment header, a tile header, or a tile group header. In addition, the image decoding device 100 may obtain syntax elements corresponding to the block shape information or the segmentation shape mode information from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may use the obtained syntax elements.

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

[0208] The image decoding device 100 may determine a segmentation rule of the image. The segmentation rule may be predetermined between the image decoding device 100 and the image encoding device 2200. The image decoding device 100 may determine the segmentation rule of the image based on information obtained from a bitstream. The image decoding device 100 may determine the segmentation rule based on information obtained from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice header, a tile header, or a tile group header. The image decoding device 100 may determine the segmentation rule differently according to a frame, a slice, a tile, a temporal layer, a maximum coding unit, or a coding unit.

[0209] The image decoding device 100 may determine the segmentation rule based on the block shape of the coding unit. The block shape may include the size, shape, aspect ratio, and direction of the coding unit. The image decoding device 100 may determine the segmentation rule based on the block shape information of the coding unit in advance. However, the present disclosure is not limited to this. The image decoding device 100 may determine the segmentation rule of the image based on information obtained from the received bit stream.

[0210] The shape of the coding unit may include a square and a non-square. When the width and height of the coding unit are the same, the image decoding device 100 may determine the shape of the coding unit as a square. In addition, when the width and height of the coding unit are different, the image decoding device 100 may determine the shape of the coding unit as a non-square.

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

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

[0213] The image decoding device 100 may adaptively determine the segmentation rule based on the size of the coding unit. The image decoding device 100 may determine the allowed segmentation shape mode differently based on the size of the coding unit. For example, the image decoding device 100 may determine whether to allow segmentation based on the size of the coding unit. The image decoding device 100 may determine the segmentation direction according to the size of the coding unit. The image decoding device 100 may determine the allowed segmentation type according to the size of the coding unit.

[0214] The partition rule determined based on the size of the coding unit may be a partition rule determined in advance in the image decoding device 100. In addition, the image decoding device 100 may determine the partition rule based on information obtained from a bitstream.

[0215] The image decoding apparatus 100 may adaptively determine a segmentation rule based on a position of a coding unit. The image decoding apparatus 100 may adaptively determine a segmentation rule based on a position of a coding unit in an image.

[0216] In addition, the image decoding device 100 may determine the segmentation rule so that the coding units generated via different segmentation paths do not have the same block shape. However, the present disclosure is not limited thereto, and the coding units generated via different segmentation paths have the same block shape. The coding units generated via different segmentation paths may have different decoding processing orders. Fig.12 The decoding process order is described, so its details are not provided again.

[0217] Fig.16 It is a block diagram of an image encoding and decoding system.

[0218] The encoding device 1600 of the image encoding and decoding system transmits an encoded bit stream of an image, and the decoding device 1650 outputs a reconstructed image by receiving and decoding the bit stream. Here, the decoding device 1650 may have a configuration similar to that of the image decoding apparatus 100.

[0219] In the encoding device 1600, when the prediction mode of the current block is the inter-frame prediction mode, the inter-frame predictor 1605 generates motion information of the current block indicating the reference block of the reference picture that is temporally adjacent to the current picture. The inter-frame predictor 1605 can determine the prediction sample of the current block by using the sample of the reference block. The intra-frame predictor 1610 can determine the intra-frame prediction information indicating a method of determining the direction in which the prediction sample or the neighboring sample similar to the current block is located, so that the prediction sample of the current block is determined by using the neighboring samples that are spatially adjacent to the current block. The inter-frame predictor 1605 and the intra-frame predictor 1610 can determine the reference sample for prediction of the current block from among the pre-reconstructed samples stored in the decoded picture buffer (DPB) 1648.

[0220] The transformer 1620 outputs a transform coefficient by performing a transform on a residual sample value obtained by subtracting a predicted sample generated by the inter-frame predictor 1605 or the intra-frame predictor 1610 from an original sample of the current block. The quantizer 1625 quantizes the transform coefficient output from the transformer 1620 and outputs the quantized transform coefficient. The entropy encoder 1630 may encode the quantized transform coefficient with a residual syntax element including a level value and output it in the form of a bitstream.

[0221] The quantized transform coefficient output from the quantizer 1625 may be inversely quantized and inversely transformed via the inverse quantizer 1633 and the inverse transformer 1635 , and thus a residual sample value may be generated again.

[0222] The residual sample value and the predicted sample value are added at the adder, thereby outputting the reconstructed sample value. The post-reconstruction filter 1640 performs post-reconstruction filtering on the reconstructed samples, and the reconstructed sample values ​​updated via the post-reconstruction filtering can be used as reference sample values ​​for intra-frame prediction to be performed by the intra-frame predictor 1610. The post-reconstruction filter 1640 can perform Hadamard transform domain filtering or bilateral filtering on the reconstructed sample values.

[0223] The in-loop filter 1645 may perform at least one of deblocking filtering or adaptive loop filtering on the reconstructed samples updated via post-reconstruction filtering. The reconstructed sample values ​​updated via filtering by the in-loop filter 1645 may be stored in the DPB 1648 and may be used as reference sample values ​​for inter-frame prediction to be performed by the inter-frame predictor 1605.

[0224] The entropy decoder 1655 of the decoding device 1650 may perform entropy decoding on the received bitstream to parse the residual syntax element including the level value. The quantized transform coefficients may be reconstructed from the residual syntax element. The inverse quantizer 1660 may output the transform coefficients by performing inverse quantization on the quantized transform coefficients, and the inverse transformer 1665 may output the residual sample values ​​by performing inverse transformation on the transform coefficients.

[0225] The inter-frame predictor 1670 of the decoding device 1650 can determine a reference picture that is temporally adjacent to the current picture by using the motion information of the current block parsed by the entropy decoder 1655, and determine a reference block in the reference picture. The inter-frame predictor 1670 can determine the prediction sample of the current block by using the sample of the reference block. The intra-frame predictor 1675 of the decoding device 1650 can determine the reference sample that is spatially adjacent to the current block by using the motion information of the current block parsed by the entropy decoder 1655, and determine the prediction sample of the current block by using the determined adjacent samples. The inter-frame predictor 1670 and the intra-frame predictor 1675 can determine the reference sample to be used for the prediction of the current block from the pre-reconstructed samples stored in the DPB 1690.

[0226] The residual sample value and the predicted sample value are added at the adder 1695 of the decoding device 1650, thereby outputting the reconstructed sample value of the current block. The post-reconstruction filter 1680 of the decoding device 1650 may perform Hadamard transform domain filtering or bilateral filtering on the reconstructed sample value. The reconstructed sample value updated by filtering by the post-reconstruction filter 1680 may be used as a reference sample value for intra prediction to be performed by the intra predictor 1675.

[0227] The in-loop filter 1685 of the decoding device 1650 may perform at least one of deblocking filtering or adaptive loop filtering on the reconstructed sample updated via post-reconstruction filtering. The reconstructed sample values ​​updated via filtering by the in-loop filter 1685 may be stored in the DPB 1690 and may be used as reference sample values ​​for inter-frame prediction to be performed by the inter-frame predictor 1670.

[0228] Fig.17 An image decoding process including post-reconstruction filtering is illustrated.

[0229] The video decoding process according to the embodiment includes parsing 1710, prediction 1720, inverse quantization 1730, inverse transform 1740, reconstruction 1750, and post-reconstruction filtering 1760 in the order of declaration. In detail, during parsing 1710, a syntax element including prediction information and a residual syntax element including a level value are obtained by using a syntax element of the current block parsed from the bitstream. During prediction 1720, a prediction mode of the current block is determined from the syntax element including the prediction information, and a prediction sample of the current block can be output by performing prediction according to the prediction mode. During inverse quantization 1730, inverse quantization is performed on the residual sample reconstructed from the residual syntax element, and thus a transform coefficient of the residual sample can be output. During inverse transform 1740, the residual sample of the current block can be output by performing inverse transform on the transform coefficient of the residual sample (when the prediction mode determined during prediction 1720 is a skip mode, inverse quantization 1730 and inverse transform 1740 can be omitted).

[0230] During reconstruction 1750, reconstructed samples of the current block may be output by combining the prediction samples of the current block and the residual samples of the current block.

[0231] During post-reconstruction filtering 1760, reconstructed samples may be updated and output by performing Hadamard transform domain filtering or bilateral filtering on the reconstructed samples output during reconstruction 1750. The reconstructed samples updated via post-reconstruction filtering may be used as reference samples for intra prediction of blocks adjacent to the current block.

[0232] After post-reconstruction filtering 1760, in-loop filtering may be performed on the reconstructed samples to update the reconstructed samples. The reconstructed samples updated via in-loop filtering may be stored in the DPB and used as reference samples for inter-frame prediction of another block.

[0233] Not only the prediction during prediction 1720, but also the filtering during post-reconstruction filtering 1760 uses samples of neighboring blocks adjacent to the current block (neighboring samples), and therefore it is necessary to determine the availability of neighboring samples before the operation. According to an embodiment, a video encoding method and a video decoding method provide a method for how to perform an operation on a current block when neighboring samples include errors or are not reconstructed. In other words, the situation in which errors occur in the reconstructed samples around the current block may include a situation in which a packet is lost in a communication environment, a situation in which slice information is lost, a situation in which picture information is lost, and the like. A method for minimizing the occurrence of error propagation caused by errors of neighboring samples during the encoding process of the current block is provided.

[0234] Will refer to Fig.23 A method for verifying the availability of neighboring reconstructed samples of a current block is described.

[0235] Fig.23A process of verifying the availability of neighboring samples adjacent to a current block according to an embodiment is illustrated.

[0236] In intra-frame prediction of the High Efficiency Video Coding (HEVC) standard or the MPEG-5 Basic Video Coding (EVC) standard that is being standardized, the constrained intra-frame prediction mode can be enabled in an environment where errors often occur. When the availability of reference samples referenced while intra-frame prediction of the current block is checked in the constrained intra-frame prediction mode, the availability of the reference samples can be determined as TRUE only when the prediction mode of the reference block that also includes the reference samples is an intra-frame prediction mode-that is, when the reference block has been reconstructed in the intra-frame prediction mode. In other words, intra-frame prediction of the current block can be performed by using the reference samples. On the other hand, when the constrained intra-frame prediction mode is disabled, the prediction mode of the reference block is not considered while verifying the availability of the reference samples.

[0237] For example, a process 2300 of determining a variable availableN indicating the availability of a reference sample at a position (xNbY, yNbY) is as follows. When the reference sample is included in a different slice or tile (2310), when the position of the reference sample is outside the picture (2320), or when the reconstruction of the reference sample is not completed (2330), the availability information AvailableN of the reference sample is determined to be FALSE, that is, an unavailable reference sample.

[0238] When the constrained intra prediction mode is enabled, in addition to the availability information availableN about the reference sample at the position (xNbY, yNbY) for intra prediction, it is also necessary to verify whether the prediction mode of the block at the position (xNbY, yNbY) is an intra prediction mode in order to perform intra prediction of the current block. When the constrained intra prediction mode is disabled, it can be determined whether the intra prediction of the current block can be performed by using the reference sample based on availableN of the reference sample. Therefore, when the constrained intra prediction mode is enabled, the error propagation phenomenon can be minimized because the neighboring samples reconstructed by using another picture (ie, the neighboring samples reconstructed in the inter prediction mode) are not used to perform intra prediction of the current block.

[0239] This operation is performed by using neighboring samples of the current block, not only for intra prediction but also for post-reconstruction filtering. Fig.18 A detailed description is described regarding Hadamard transform domain filtering as a type of post-reconstruction filtering.

[0240] Fig.18 The reference region used for post-reconstruction filtering is illustrated.

[0241] When performing post-reconstruction filtering, depending on the size or shape of the filter label, the reconstructed image information around the current block can be used. In other words, post-reconstruction filtering can be performed on the Fig.18 The outer lines of the current block 1800 in the vertical direction are extended by N samples 1810 on the padding area 1820. Here, N may vary depending on the size or shape of the filter label. When the reconstructed image information appears in the padding area 1820, the reconstructed image information appearing in the padding area 1820 may be used during post-reconstruction filtering.

[0242] For example, when performing 2×2 Hadamard transform domain filtering, the padding region 1820 is expanded by setting N to 1. When pre-reconstructed samples appear in the padding region 1820, the pre-reconstructed information can be used to perform filtering. However, when the reference samples located in the padding region 1820 are not available, the reference samples of the padding region 1820 can be padded by replacing the sample values ​​of the reconstructed samples of the current block adjacent to the reference samples with the padding values ​​of the reference samples.

[0243] According to an embodiment, a video encoding method and a decoding method as well as a video encoding device and a decoding device propose a method of performing post-reconstruction filtering on a current block when a constraint prediction mode is enabled. Figures 19 to 22 A method and apparatus for encoding or decoding a video by performing post-reconstruction filtering according to an embodiment of the present specification is described.

[0244] Hereinafter, the maximum size of a coding unit means the maximum size of a longer side among the width and height of the coding unit, and the minimum size of a coding unit means the minimum size of a longer side among the width and height of the coding unit.

[0245] Hereinafter, a tree structure may represent a hierarchical structure of one or more coding units formed depending on whether a division mode of a coding unit is quadruple division, binary division, ternary division, or no division. Figure 5 The hierarchical structure of blocks generated from the current coding unit by the partitioning process is called a tree structure.

[0246] Fig.19 is a block diagram of a video decoding apparatus according to an embodiment.

[0247] refer to Fig.19 , the video decoding device 1900 according to an embodiment may include an acquirer 1910 , a reconstructor 1920 , and a post-reconstruction filter 1930 .

[0248] The video decoding device 1900 may obtain a bitstream generated as a result of encoding an image, determine a position of a block partitioned from a picture based on information included in the bitstream, and decode the block, such as a maximum coding unit and a coding unit.

[0249] The video decoding device 1900 according to an embodiment may include a central processor (not shown) for controlling the acquirer 1910, the reconstructor 1920, and the post-reconstruction filter 1930. Alternatively, the acquirer 1910, the reconstructor 1920, and the post-reconstruction filter 1930 may be operated by their own processors (not shown), respectively, and the processors may operate systematically so that the video decoding device 1900 operates as a whole. Alternatively, the acquirer 1910, the reconstructor 1920, and the post-reconstruction filter 1930 may be controlled under the control of an external processor (not shown) of the video decoding device 1900.

[0250] The video decoding apparatus 1900 may include at least one data storage (not shown) storing input and output data of the acquirer 1910, the reconstructor 1920, and the post-reconstruction filter 1930. The video decoding apparatus 1900 may include a memory controller (not shown) for controlling data input and output of the data storage.

[0251] The video decoding device 1900 can perform image decoding operations including prediction by operating in connection with an internal video decoding processor or an external video decoding processor so as to reconstruct an image via image decoding. When not only a separate processor but also a central processing unit or a graphics processing unit includes an image decoding processing module, the internal video decoding processor of the video decoding device 1900 according to an embodiment can perform basic image decoding operations.

[0252] The video decoding device 1900 may be included in the above-mentioned image decoding device 100. For example, the acquirer 1910 may correspond to the receiver 110 of the image decoding device 100, and the reconstructor 1920 and the post-reconstruction filter 1930 may correspond to the decoder 120 of the image decoding device 100. The video decoding device 1900 may be the same as the above-mentioned reference numeral 1910. Fig.16 The described image encoding and decoding system corresponds to the decoding device 1650. For example, the acquirer 1910 may correspond to the entropy decoder 1655 of the decoding device 1650, the reconstructor 1920 may include the inverse quantizer 1660, the inverse transformer 1665, the inter-frame predictor 1670, the intra-frame predictor 1675, the adder 1695 and the in-loop filter 1685 of the decoding device 1650, and the post-reconstruction filter 1930 may correspond to the post-reconstruction filter 1680 of the decoding device 1650.

[0253] The acquirer 1910 receives a bitstream generated as a result of encoding an image. The bitstream may include information about the current picture. The picture may include one or more maximum coding units. The reconstructor 1920 may determine the position of the current block in the picture based on the information obtained from the bitstream. The current block is a block generated when the picture is partitioned according to the tree structure, and may correspond to a maximum coding unit or a coding unit, for example. The reconstructor 1920 determines whether to further partition the current block into sub-blocks of a lower depth, and may determine the tree structure of the current block. The lower depth may be determined by adding the number of partitions from the current block to the sub-block to the current depth of the current block. Among the blocks forming the tree structure included in the current picture, the blocks located at the leaves are blocks that are no longer partitioned. Therefore, the reconstructor 1920 may decode one or more blocks that are no longer partitioned by performing inverse quantization, inverse transformation, and prediction on the blocks.

[0254] The reconstructor 1920 may generate a prediction sample of the current block by performing prediction on the current block. The reconstructor 1920 may generate a residual sample of the current block by performing an inverse transform on the current block. The reconstructor 1920 may generate a reconstructed sample of the current block by using the prediction sample of the current block and the residual sample of the current block. The reconstructor 1920 may reconstruct the current image by reconstructing the sample for each block.

[0255] For example, when the prediction mode of the current block is an intra mode, the reconstructor 1920 can determine a reference sample among samples of spatially adjacent blocks located in an intra prediction direction by using the intra prediction information of the current block, and determine a prediction sample corresponding to the current block by using the reference sample.

[0256] For example, when the prediction mode of the current block is the inter mode, the reconstructor 1920 may reconstruct the current block by using the motion vector of the current block. The reconstructor 1920 may determine a reference block in a reference picture by using the motion vector of the current block, and determine a prediction sample corresponding to the current block from a reference sample included in the reference block. The reconstructor 1920 may reconstruct a transform coefficient by using a transform coefficient level obtained from a bitstream, and reconstruct a residual sample by performing inverse quantization and inverse transformation on the transform coefficient. The reconstructor 1920 may determine a reconstructed sample of the current block by combining the prediction sample and the residual sample corresponding to the current block.

[0257] When the current block is predicted in skip mode, the reconstructor 1920 may not need to parse the transform coefficient of the current block from the bitstream. The reconstructor 1920 may determine the reconstructed sample of the current block by using the prediction sample of the current block as it is.

[0258] The obtainer 1910 according to an embodiment may obtain constraint prediction information indicating whether the constrained intra prediction mode is enabled.

[0259] According to the embodiment, the post-reconstruction filter 1930 can perform post-reconstruction filtering by using at least one of the reconstructed samples of the current block or the filling values ​​corresponding to the adjacent samples. For example, when the current block is not outside the filter target area, the post-reconstruction filtering can be performed by using the reconstructed samples of the current block. Here, the filter target area may include the current block and the outer area of ​​the current block. In this case, the post-reconstruction filter 1930 can fill the outer area of ​​the current block with special sample values. The post-reconstruction filter 1930 can perform filtering on the reconstructed samples of the current block adjacent to the outline of the current block by using the filled sample values ​​(hereinafter referred to as the filling values).

[0260] In detail, when the constraint prediction information indicates a constrained intra prediction mode and the prediction mode of the adjacent block is not an intra prediction mode, the post-reconstruction filter 1930 may fill the adjacent samples adjacent to the outside of the boundary between the current block and the adjacent block by using the reconstructed samples of the current block. The post-reconstruction filter 1930 may perform post-reconstruction filtering on the current block by using the filling value corresponding to the adjacent sample.

[0261] In the following, reference will be made to Fig. 20 A video decoding method in which the video decoding apparatus 1900 according to an embodiment adds an outer area of ​​a current block and uses it for post-reconstruction filtering is described.

[0262] Fig. 20 is a flowchart of a video decoding method according to an embodiment.

[0263] In operation 210, the acquirer 1910 may obtain constraint prediction information indicating whether the constrained intra prediction mode is enabled. The constraint prediction information may be obtained from an image parameter set. Therefore, the constraint prediction information may indicate whether the constrained intra prediction mode is enabled for the current picture. When the constrained intra prediction mode of the current picture is enabled, the constrained intra prediction mode may also be enabled for the current block included in the current picture.

[0264] In operation 2020, the reconstructor 1920 may generate a reconstructed sample of the current block by using the prediction sample of the current block and the residual sample of the current block.

[0265] The reconstructor 1920 according to an embodiment may generate a prediction sample of the current block by performing prediction on the current block. The reconstructor 1920 according to an embodiment may generate a residual sample of the current block by performing inverse transform on the current block. However, when the current block is predicted in skip mode, the reconstructor 1920 may determine the sample value of the residual sample to be 0. The reconstructor 1920 may determine the value obtained by adding the prediction sample of the current block and the residual sample of the current block as the sample value of the reconstructed sample of the current block.

[0266] In operation 2030, when the constrained intra prediction mode is enabled according to the constrained prediction information and the prediction mode of the neighboring block is not the intra prediction mode, the post reconstruction filter 1930 may fill the neighboring samples adjacent to the outside of the boundary between the current block and the neighboring block by using the reconstructed samples of the current block.

[0267] The post-reconstruction filter 1930 according to an embodiment may determine a padding value corresponding to a neighboring sample located outside a boundary between a current block and a neighboring block to be the same as a reconstructed sample value of the current block adjacent to the boundary.

[0268] When samples of a neighboring block adjacent to a current block are not available for predicting the current block, the post-reconstruction filter 1930 according to an embodiment may determine a padding value corresponding to a neighboring sample located outside a boundary between the current block and the neighboring block to be the same as a reconstructed sample value of the current block adjacent to the boundary.

[0269] In operation 2040, the post-reconstruction filter 1930 may perform post-reconstruction filtering on the current block by using padding values ​​corresponding to neighboring samples. The post-reconstruction filter 1930 may perform post-reconstruction filtering on the current block by using padded sample values ​​of neighboring samples (ie, padding values ​​corresponding to neighboring samples).

[0270] The post-reconstruction filter 1930 may perform Hadamard transform domain filtering by using the reconstructed samples of the current block adjacent to the boundary of the current block and the padding values ​​corresponding to the neighboring samples adjacent to the boundary. For example, the post-reconstruction filter 1930 may perform 2×2 Hadamard transform domain filtering by using two reconstructed samples of the current block adjacent to the boundary of the current block and the padding values ​​corresponding to the two neighboring samples adjacent to the boundary.

[0271] In detail, Hadamard transform domain filtering can be applied to a luma reconstruction block where the quantization parameter is greater than 18 and the product of the height and width of the block is equal to or greater than 64. The filter parameters can be determined based on the lookup table and the quantization parameter. The post-reconstruction filter 1930 can determine a 2×2 area including the current reconstructed sample and adjacent reconstructed samples surrounding the current sample, and output four transform coefficients by performing a Hadamard transform on four reconstructed samples included in the 2×2 area, especially when padded samples are included, performing a Hadamard transform on the four padded samples. Subcomponents can be generated by performing an inverse Hadamard transform on the main component generated by filtering the transform coefficients using a lookup table. When the subcomponents overlap, the filtered sample value of the current reconstructed sample can be determined. The post-reconstruction filter 1930 can perform Hadamard transform domain filtering on the reconstructed samples included in the current block.

[0272] The post-reconstruction filter 1930 according to another embodiment may perform bilateral filtering by using reconstructed samples of the current block adjacent to a boundary of the current block and padding values ​​corresponding to neighboring samples adjacent to the boundary.

[0273] The reconstructed samples of the current block updated through post-reconstruction filtering by the post-reconstruction filter 1930 may be used to perform intra prediction of another block adjacent to the current block.

[0274] The video decoding device 1900 according to an embodiment can update the sample value of the reconstructed sample by performing in-loop filtering on the reconstructed sample of the current block updated by post-reconstruction filtering. The in-loop filtering may include deblocking filtering and adaptive loop filtering (ALF). The reconstructed sample updated by in-loop filtering can be used as a reference sample for inter-frame prediction of a block of a picture other than the current picture.

[0275] Therefore, considering the low reliability of the adjacent samples, not only when the reconstructed samples of the adjacent blocks are not available due to the poor communication environment or the encoding environment, but also when the constrained intra prediction mode is enabled and the adjacent blocks are not reconstructed in the intra prediction mode, the video decoding device 1900 according to the embodiment does not use the sample values ​​of the adjacent blocks to perform post-reconstruction filtering. When the constrained intra prediction mode is enabled and the adjacent blocks are not reconstructed in the intra prediction mode, the video decoding device 1900 can fill the adjacent samples outside the adjacent current block by using the reconstructed sample values ​​of the current block adjacent to the contour of the current block instead of the sample values ​​of the adjacent blocks, thereby using only the reconstructed sample values ​​of the current block for post-reconstruction filtering. Therefore, during the process of reconstructing the current block, the phenomenon in which the error occurring from another block is propagated can be minimized.

[0276] In the following, reference will be made to Fig.21 A video encoding apparatus for performing post-reconstruction filtering using samples of neighboring blocks is described.

[0277] Fig.21 is a block diagram of a video encoding apparatus according to an embodiment.

[0278] refer to Fig.21 , the video encoding device 2100 according to an embodiment may include an information encoder 2110 , a reconstructor 2120 , and a post-reconstruction filter 2130 .

[0279] The information encoder according to an embodiment may generate constraint prediction information indicating whether the constrained intra prediction mode is enabled, perform entropy encoding on the constraint prediction information, and output it in the form of a bitstream.

[0280] The video encoding apparatus 2100 according to an embodiment may split a picture into one or more luma coding units and encode the coding units.

[0281] The video encoding device 2100 according to an embodiment may include a central processor (not shown) for controlling the information encoder 2110, the reconstructor 2120, and the post-reconstruction filter 2130. Alternatively, the information encoder 2110, the reconstructor 2120, and the post-reconstruction filter 2130 may be operated by their own processors (not shown), respectively, and the processors may operate systematically so that the video encoding device 2100 operates as a whole. Alternatively, the information encoder 2110, the reconstructor 2120, and the post-reconstruction filter 2130 may be controlled under the control of an external processor (not shown) of the video encoding device 2100.

[0282] The video encoding apparatus 2100 may include at least one data storage (not shown) storing input and output data of the information encoder 2110, the reconstructor 2120, and the post-reconstruction filter 2130. The video encoding apparatus 2100 may include a memory controller (not shown) for controlling data input and output of the data storage.

[0283] The video encoding device 2100 can perform image encoding operations including prediction by operating in connection with an internal video encoding processor or an external video encoding processor for image encoding. When not only a separate processor but also a central processing unit or a graphics processing unit includes an image encoding processing module, the internal video encoding processor of the video encoding device 2100 according to an embodiment can perform basic image encoding operations.

[0284] The video encoding apparatus 2100 may be similar to the above-mentioned Fig.16 The image encoding and decoding system described herein corresponds to the encoding device 1600. For example, the information encoder 2110 may include the inter-frame predictor 1605, the intra-frame predictor 1610, the transformer 1620, the quantizer 1625, and the entropy encoder 1630 of the encoding device 1600. The reconstructor 2120 may include the inverse quantizer 1633, the inverse transformer 1635, the adder 1615, and the in-loop filter 1645 of the encoding device 1600, and the post-reconstruction filter 1930 may correspond to the post-reconstruction filter 1640 of the encoding device 1600.

[0285] The information encoder 2110 according to an embodiment may split a picture into a plurality of maximum coding units, and split each maximum coding unit into blocks having various sizes and various shapes for encoding.

[0286] For example, when the prediction mode of the current block is the intra mode, the information encoder 2110 can determine a reference sample among the samples of the spatially adjacent blocks located in the intra prediction direction of the current block, and determine a prediction sample corresponding to the current block by using the reference sample.

[0287] For example, when predicting the current block in skip mode, the information encoder 2110 may determine a motion vector for predicting the current block. The information encoder 2110 may determine a reference block of the current block from a reference picture, and determine a motion vector indicating the reference block from the current block. In skip mode, the residual block may not need to be encoded.

[0288] For example, when the prediction mode of the current block is the inter mode, the information encoder 2110 may determine a motion vector for predicting the current block. The information encoder 2110 may determine a reference block of the current block from a reference picture, and determine a motion vector indicating the reference block from the current block. The information encoder 2110 may determine a residual sample between the current blocks from a reference sample included in the reference block, and generate a quantized transform coefficient by performing transform and quantization on the residual sample based on the transform unit.

[0289] The current block is a block generated when the image is divided according to the tree structure, and may correspond to, for example, a maximum coding unit, a coding unit, or a transformation unit. The information encoder 2110 may encode blocks included in a picture according to a coding order.

[0290] The information encoder 2110 may output a bitstream corresponding to a syntax element including a plurality of pieces of encoding information determined as a result of encoding the luma block. In detail, the information encoder 2110 may generate constrained prediction information indicating a constrained intra prediction mode and add it to a picture parameter set.

[0291] The reconstructor 2120 according to an embodiment may generate a reconstructed sample of the current block by using the prediction sample of the current block and the residual sample of the current block.

[0292] When the constrained intra prediction mode is enabled and the prediction mode of the neighboring block is not the intra prediction mode, the post reconstruction filter 2130 according to an embodiment may fill the neighboring samples adjacent to the outside of the boundary between the current block and the neighboring block by using the reconstructed samples of the current block.

[0293] The post-reconstruction filter 2130 according to an embodiment may perform post-reconstruction filtering on the current block by using padding values ​​corresponding to adjacent samples.

[0294] In the following, reference Fig. 22 The process of performing video encoding by the video encoding apparatus 2100 is described.

[0295] Fig. 22 is a flowchart of a video encoding method according to an embodiment.

[0296] In operation 2210, the information encoder 2110 may generate constraint prediction information indicating whether the constrained intra prediction mode is enabled. The information encoder 2110 may generate constraint prediction information, such as indicating whether the constrained intra prediction mode is enabled for the current picture. Therefore, the constraint prediction information may be output by being included in the picture parameter set. When the constrained intra prediction mode of the current picture is enabled, the constrained intra prediction mode may also be enabled for the current block included in the current picture.

[0297] In operation 2220, the reconstructor 2120 may generate a reconstructed sample of the current block by using the prediction sample of the current block and the residual sample of the current block. However, when the current block is predicted in skip mode, the residual sample is not generated, and thus the reconstructed sample of the current block may be generated by using only the prediction sample of the current block.

[0298] In operation 2230 , when the constrained intra prediction mode is enabled and the prediction mode of the neighboring block is not the intra prediction mode, the post reconstruction filter 2130 may fill neighboring samples adjacent to the outside of the boundary between the current block and the neighboring block by using reconstructed samples of the current block.

[0299] The post-reconstruction filter 2130 according to an embodiment may determine a padding value corresponding to a neighboring sample located outside a boundary between a current block and a neighboring block to be the same as a reconstructed sample value of the current block adjacent to the boundary.

[0300] When samples of a neighboring block adjacent to a current block are not available for prediction of the current block, the post-reconstruction filter 2130 according to an embodiment may determine a padding value corresponding to a neighboring sample located outside a boundary between the current block and the neighboring block to be the same as a reconstructed sample value of the current block adjacent to the boundary.

[0301] In operation 2240, the post-reconstruction filter 2130 may perform post-reconstruction filtering on the current block by using padding values ​​corresponding to neighboring samples. The post-reconstruction filter 2130 may perform post-reconstruction filtering on the current block by using padding sample values ​​of neighboring samples, that is, padding values ​​corresponding to neighboring samples.

[0302] The post-reconstruction filter 2130 may perform Hadamard transform domain filtering by using the reconstructed samples of the current block adjacent to the boundary of the current block and the padding values ​​corresponding to the adjacent samples of the adjacent boundary. For example, the post-reconstruction filter 2130 may perform 2×2 Hadamard transform domain filtering by using two reconstructed samples of the current block adjacent to the boundary of the current block and the padding values ​​corresponding to the two adjacent samples of the adjacent boundary.

[0303] The post-reconstruction filter 2130 according to another embodiment may perform bilateral filtering by using reconstructed samples of the current block adjacent to a boundary of the current block and padding values ​​corresponding to neighboring samples adjacent to the boundary.

[0304] The reconstructed samples of the current block updated by the post-reconstruction filtering 2130 can be used to perform intra prediction of another block adjacent to the current block. In addition, the reconstructed samples of the current block updated by the post-reconstruction filtering can be used to perform inter prediction on blocks of pictures other than the current picture.

[0305] The video encoding device 2100 according to an embodiment can update the sample value of the reconstructed sample by performing in-loop filtering on the reconstructed sample of the current block updated by post-reconstruction filtering. In-loop filtering may include deblocking filtering and adaptive loop filtering (ALF). The reconstructed sample updated by in-loop filtering can be used as a reference sample for inter-frame prediction of another block.

[0306] Therefore, considering the low reliability of adjacent samples, not only when the reconstructed samples of the adjacent blocks are unavailable due to a poor communication environment or a compilation environment, but also when the constrained intra prediction mode is enabled and the adjacent blocks are not reconstructed in the intra prediction mode, the video encoding device 2100 according to the embodiment does not use the sample values ​​of the adjacent blocks to perform post-reconstruction filtering. When the constrained intra prediction mode is enabled and the adjacent blocks are not reconstructed in the intra prediction mode, the video encoding device 2100 can fill the adjacent samples outside the adjacent current block by using the reconstructed sample values ​​of the current block of the contour of the adjacent current block instead of the sample values ​​of the adjacent blocks, thereby using only the reconstructed sample values ​​of the current block for post-reconstruction filtering. Therefore, in the process of reconstructing the current block, the phenomenon that the error occurring from another block is propagated can be minimized.

[0307] The post-reconstruction filter 2130 and the post-reconstruction filter 1930 according to the embodiment may determine a padding value corresponding to a neighboring sample of a contour adjacent to the current block, and perform post-reconstruction filtering by using the padding value. Fig.24 and Fig.25 Describes the process of padding adjacent samples for post-reconstruction filtering.

[0308] Fig.24 A process of determining padding values ​​corresponding to neighboring samples for post-reconstruction filtering on a current block based on availability of the neighboring samples according to an embodiment is illustrated.

[0309] When the position of the sample for filtering is represented by x, y, the post-reconstruction filter 1930 may determine the padding value recSamplesPad[x][y] for filtering with respect to the current block. When the position of the sample is within the current block, the padding value recSamplesPad[x][y] may be determined to be the same as the reconstructed sample value recSamples[x][y] of the current block (operation 2400).

[0310] When the location of the sample is not within the current block, availability N of the sample may be determined (operation 2410).

[0311] First, the x offset dx and the y offset dy of the padding value are each set to 0. When the x coordinate of the sample is -1, that is, when the sample is a neighboring sample outside the left boundary of the current block in the horizontal direction, and availableN of the sample is FALSE, that is, when the sample is not available, dx is set to 1. When the x coordinate of the sample is nCbW, that is, when the sample is a neighboring sample outside the right boundary of the current block in the horizontal direction, and availableN of the sample is FALSE, dx is set to -1. When the y coordinate of the sample is -1, that is, when the sample is a neighboring sample outside the upper boundary of the current block in the vertical direction, and availableN of the sample is FALSE, dy is set to 1. When the y coordinate of the sample is nCbH, that is, when the sample is a neighboring sample outside the lower boundary of the current block in the vertical direction, and availableN of the sample is FALSE, dy is set to -1 (operation 2420).

[0312] When the setting of dx and dy is completed in operation 2420 , the padding value recSamplesPad[x][y] may be determined to be the same as the reconstructed sample value recSamples[x+dx][y+dy] of the current block (operation 2430 ).

[0313] In other words, when the x coordinate of the sample is -1 and the sample is not available, dx is 1, and thus the padding value recSamplesPad[-1][y] may be determined to be the same as the reconstructed sample value recSamples[-1+1][y] of the current block, i.e., the reconstructed sample value of the current block within the left boundary of the horizontally adjacent current block. When the x coordinate of the sample is nCbW and the sample is not available, dx is -1, and thus the padding value recSamplesPad[nCbW][y] may be determined to be the same as the reconstructed sample value recSamples[nCbW-1][y] of the current block, i.e., the reconstructed sample value of the current block within the right boundary of the horizontally adjacent current block. When the y coordinate of the sample is -1 and the sample is not available, dy is 1, so the filling value recSamplesPad[x][-1] can be determined to be the same as the reconstructed sample value recSamples[x][-1+1] of the current block, that is, the reconstructed sample value of the current block that is adjacent to the upper boundary of the current block in the vertical direction. When the y coordinate of the sample is nCbH and the sample is not available, dy is -1, so the filling value recSamplesPad[x][nCbH-1] can be determined to be the same as the reconstructed sample value recSamples[x][nCbH-1] of the current block, that is, the reconstructed sample value of the current block that is adjacent to the lower boundary of the current block in the vertical direction.

[0314] Therefore, in operation 2420, when the location of the sample to be filtered is a neighboring sample outside the boundary of the neighboring current block and the sample is not available, post-reconstruction filtering may be performed by using a reconstructed sample of the current block within the neighboring boundary instead of the sample.

[0315] When referring to another picture reconstructed in a communication environment or coding environment where errors may occur, adjacent samples may be reconstructed while including errors. When such reconstructed adjacent samples are used to perform post-reconstruction filtering, errors included in the adjacent samples may also be propagated to the current block. In order to prevent such error propagation, the video encoding device 2100 and the video decoding device 1900 according to the embodiment may perform post-reconstruction filtering after verifying not only the availability of adjacent samples but also the prediction mode. Fig.25 The operations of the post-reconstruction filter 1930 and the post-reconstruction filter 2130 according to an embodiment are described.

[0316] Fig.25 A process of determining padding values ​​corresponding to neighboring samples for post-reconstruction filtering on a current block based on availability of neighboring samples and a constrained prediction mode according to an embodiment is illustrated.

[0317] exist Fig.24 The conditions for determining the offsets dx and dy in operation 2420 are Fig.25Operations 2510 to 2540 are changed.

[0318] In operation 2510, when the x coordinate of the sample is -1, that is, when the sample is a neighboring sample outside the left boundary of the current block in the horizontal direction, and when the availabilityN of the sample is FALSE or the constrained intra prediction mode is enabled (constraint_intra_pred_flag is equal to 1) and the prediction mode of the neighboring block including the neighboring sample is not the intra prediction mode (CuPredMode[xCb+x][yCb+y] is not equal to MODE_INTRA), that is, when the neighboring sample is not reconstructed in the intra prediction mode, dx is set to 1.

[0319] In operation 2520, when the x coordinate of the sample is nCbW, that is, when the sample is a neighboring sample outside the right boundary of the current block in the horizontal direction, and when the availability availableN of the sample is FALSE or the constrained intra prediction mode is enabled and the prediction mode of the neighboring block including the neighboring sample is not the intra prediction mode, that is, when the neighboring sample is not reconstructed in the intra prediction mode, dx is set to -1.

[0320] In operation 2530, when the y coordinate of the sample is -1, that is, when the sample is a neighboring sample outside the upper boundary of the current block in the vertical direction, and when the availability availableN of the sample is FALSE or the constrained intra prediction mode is enabled and the prediction mode of the neighboring block including the neighboring sample is not the intra prediction mode, that is, when the neighboring sample is not reconstructed in the intra prediction mode, dy is set to 1.

[0321] In operation 2540, when the y coordinate of the sample is nCbH, that is, when the sample is a neighboring sample outside the lower boundary of the current block in the vertical direction, and when the availability availableN of the sample is FALSE or the constrained intra prediction mode is enabled and the prediction mode of the neighboring block including the neighboring sample is not the intra prediction mode, that is, when the neighboring sample is not reconstructed in the intra prediction mode, dy is set to -1.

[0322] Therefore, when the x coordinate of the sample is -1 and the sample is not available, or when the constrained intra prediction mode is enabled and the neighboring block including the neighboring sample is not in intra prediction mode (when the neighboring sample is not reconstructed in intra prediction mode), dx is 1, and thus the padding value recSamplesPad[-1][y] can be determined to be the same as the reconstructed sample value of the current block within the left boundary of the horizontally adjacent current block.

[0323] When the x coordinate of the sample is nCbW and the sample is not available, or the constrained intra prediction mode is enabled and the neighboring block including the neighboring sample is not in intra prediction mode (when the neighboring sample is not reconstructed in intra prediction mode), dx is -1, and thus the padding value recSamplesPad[nCbW][y] may be determined to be the same as the reconstructed sample value of the current block within the right boundary of the horizontally adjacent current block.

[0324] When the y coordinate of the sample is -1 and the sample is not available, or when the constrained intra prediction mode is enabled and the neighboring block including the neighboring sample is not in intra prediction mode (when the neighboring sample is not reconstructed in intra prediction mode), dy is 1, and therefore the padding value recSamplesPad[x][-1] can be determined to be the same as the reconstructed sample value of the current block within the upper boundary of the vertically adjacent current block.

[0325] When the y coordinate of the sample is nCbH and the sample is not available, or the constrained intra prediction mode is enabled and the neighboring block including the neighboring sample is not in intra prediction mode (when the neighboring sample is not reconstructed in intra prediction mode), dy is -1, and therefore the padding value recSamplesPad[x][nCbH-1] can be determined to be the same as the reconstructed sample value of the current block within the lower boundary of the vertically adjacent current block.

[0326] Post-reconstruction filtering is performed on the current sample by including four padding values ​​recSamplesPad[x][y] in the 2x2 padding area. Therefore, when the four samples covered by the padding area are all reconstructed samples of the current block, the four samples are all available, so the four padding values ​​can be determined to be the same as the reconstructed sample values ​​of the current block. Therefore, post-reconstruction filtering can be performed by using the reconstructed sample values ​​of the current block.

[0327] However, when some of the four samples covered by the padding area are reconstructed samples of the neighboring blocks, it is impossible to determine the padding value by using the reconstructed sample values ​​of the neighboring blocks when (i) the reconstructed samples of the neighboring blocks are not available or (ii) the neighboring blocks are reconstructed in a prediction mode other than the intra prediction mode while the constrained intra prediction mode is enabled. In this case, four padding values ​​can be ensured by determining the padding values ​​of the reconstructed samples corresponding to the neighboring blocks using the reconstructed sample values ​​of the current block adjacent to the reconstructed samples of the neighboring blocks. Therefore, also at this time, post-reconstruction filtering is performed by using the reconstructed sample values ​​of the current block. In other words, when (i) the reconstructed samples of the neighboring blocks are not available or (ii) the neighboring blocks are reconstructed in a prediction mode other than the intra prediction mode while the constrained intra prediction mode is enabled, the reliability of determining the reconstructed sample values ​​of the neighboring blocks is low, and therefore post-reconstruction filtering is performed using only the reconstructed sample values ​​of the current block instead of the reconstructed sample values ​​of the neighboring blocks. The video encoding device 2100 and the video decoding device 1900 according to an embodiment can prevent errors occurring at neighboring blocks from propagating to the current block by performing post-reconstruction filtering considering not only the availability of neighboring samples but also whether the constrained intra prediction mode and the prediction mode of the neighboring blocks are enabled.

[0328] In the following, reference will be made to Figure 26 to Figure 31 Methods for efficiently encoding syntax associated with intra prediction modes are described.

[0329] Detailed tools used in the intra prediction mode in the current VVC standard may include intra sub-block partitioning (ISP), matrix-based intra prediction (MIP), multiple reference line prediction (MRL), and intra block copy (IBC). In the VVC standard, a flag indicating the usage of each intra prediction tool is signaled to the intra prediction mode. When all flags indicating the usage of the intra prediction tool are disabled (off state), intra prediction information (information indicating the intra prediction direction) used to perform prediction in the normal intra prediction mode is finally signaled. However, when there are more intra prediction tools that are not applied to intra prediction, it is somewhat inefficient to signal all flags indicating the usage of intra prediction tools in advance.

[0330] The video encoding apparatus 2100 and the video decoding apparatus 1900 according to an embodiment propose a method of first verifying whether prediction is performed in a normal intra prediction mode and then transmitting a flag indicating the usage of the remaining intra prediction tools.

[0331] The following will refer to Fig.26 For cases where tools are sent separately and reference Fig. 27 A flag indicating usage of the remaining intra prediction tools is described for a case where two or more intra prediction tools form a set to generate an index indicating enable / disable and transmit the index.

[0332] Fig.26 A pseudo code for defining intra prediction when a flag indicating a case of normal intra prediction mode occurs according to an embodiment is illustrated.

[0333] When the flag 2610 indicating whether prediction is performed in the normal intra prediction mode is first defined and prediction according to the normal intra prediction mode is performed, only the information 2620 for determining the intra prediction direction may be signaled without transmitting the flag 2640 indicating the usage of another intra prediction tool. In detail, regarding the information 2620 for determining the intra prediction direction, a most probable mode (MPM) flag (intra_mpm_flag) may be signaled, and may include an MPM index (intra_mpm_idx) or a residual mode index (intra_remainder). Therefore, according to Fig.26 The syntax signaling method can save bits used to represent the intra-frame prediction mode.

[0334] Normal intra prediction mode refers to a prediction mode that uses a directional prediction mode during intra prediction. Prediction according to normal intra prediction mode can be performed with an intra prediction tool or a post-processing tool that does not separately require a flag indicating usage, such as position-dependent intra prediction combining (PDPC) or interpolation filtering.

[0335] Intra prediction tools other than normal intra prediction mode represent intra prediction, prediction tools such as ISP, MIP, MRL, and IBC extended from directional intra prediction are applied together to the intra prediction, and generally, a flag indicating usage of the intra prediction tool may appear separately.

[0336] Fig. 27 A pseudo code for defining intra prediction when an index indicating on / off states of remaining intra prediction modes other than a normal intra prediction mode is output according to another embodiment is illustrated.

[0337] When the prediction mode is not the normal intra prediction mode, the video decoding device 1900 according to an embodiment may obtain an intra prediction tool index by using a correlation of the intra prediction tool.

[0338] For example, when the intra-frame sub-block partitioning (ISP) tool and the multi-reference line prediction (MRL) tool are combined, the combination of 00, 01, 10 and 11 of each bit indicating the enabling of ISP / MRL can be indexed. Therefore, the enabled state of two or more intra-frame prediction tools can be indicated by using an index of two or more bits instead of a one-bit flag. When there is a correlation between intra-frame prediction tools (for example, when a special tool is enabled, another tool is unconditionally enabled or disabled, etc.), the index candidates can be reduced, and therefore the number of bits used to represent the index can also be reduced. As another example, by applying a context model to a frequently selected combined index, the number of bits signaled can be saved.

[0339] The video encoding apparatus 2100 may combine indexes indicating activation of all tools when there are several intra prediction tools, and use a combined index indicating the usage amount of the tools, thereby applying the combined index method only when the number of bits indicating the combined index is reduced.

[0340] For example, it is difficult to use a matrix-based intra prediction (MIP) tool, an ISP tool, an MRL tool, and a residual differential pulse code modulation (RDPCM) tool for intra quantization together. Therefore, a signal indicating the amount of MIP used may be independently signaled, and an index indicating the amount of remaining tools used may be combined, and fixed length coding (FLC) may be performed on the index.

[0341] As another example, priorities of intra prediction tools may be determined, and a combination index of the intra prediction tools may be signaled via a truncated binary encoding method.

[0342] refer to Fig. 27 , when a flag 2710 indicating whether prediction is performed in a normal intra prediction mode is first defined and prediction according to the normal intra prediction mode is performed, only information 2720 for determining an intra prediction direction may be signaled without sending a combination index 2740 indicating the amount of use of another intra prediction tool. When prediction according to the normal intra prediction mode is not performed, a combination index 2740 indicating the amount of use of another intra prediction tool may be signaled.

[0343] Fig.28 A block size allowed to perform intra prediction for each of various intra prediction modes is illustrated.

[0344] For intra prediction tools used in the current VVC standard, there are Fig.28 The block size restriction shown. Since it is necessary to verify whether the block size is within the restricted size range before executing each intra prediction tool, the operational burden may increase.

[0345] refer to Fig.29 , Fig.30 and Fig.31 , a method by which a process of verifying a block size used for a prediction tool within a frame by the video encoding device 2100 and the video decoding device 1900 according to an embodiment is reduced is proposed.

[0346] Fig.29 Pseudo code for limiting a block size immediately before determining an intra prediction mode according to an embodiment is illustrated.

[0347] The maximum block size allowed for the intra prediction tool can be unified as 64x64. In this case, whenever determining whether to execute each intra prediction tool, there is no need to compare the current block size with the block size limit. Fig.29 , the video decoding device 1900 can verify whether the height and width of the current block are each equal to or less than 64 (if (width<=64&&height<=64)) immediately before the information indicating the usage of the intra-frame prediction tool (such as ISP, MIP, MRL, or IBC) is encoded.

[0348] Fig.30 Pseudo code for limiting block intra size and normal intra prediction mode flag according to another embodiment is illustrated.

[0349] according to Fig.30 , when the normal intra prediction mode flag is defined, it can be verified whether prediction according to the intra prediction mode is performed and whether the width and height of the current block are each equal to or less than 64, that is, the maximum size allowed for the intra prediction tool.

[0350] Fig.31 Pseudo code for limiting intra prediction to be performed only for a specific block size or smaller according to another embodiment is illustrated.

[0351] according to Fig.31 In an embodiment of the present invention, intra prediction may be performed only when the size of the current block is equal to or smaller than a specific size, regardless of the dual-tree mode or the single-tree mode.

[0352] A method in which the video encoding device 2100 and the video decoding device 1900 change encoding tools when the constrained intra prediction mode is enabled according to an embodiment will be described below.

[0353] When constrained intra prediction mode is enabled, existing coding tools may need to be changed in order to ensure error resilience. For example, when constrained intra prediction mode is applied, issues may arise regarding whether to process the current block as an inter block or an intra block, and how to use reference samples when the current block is defined as an intra block.

[0354] First, a method of determining a reference sample will be described.

[0355] When the prediction mode of the current block is the intra prediction mode, it is necessary to use samples of the adjacent blocks to perform intra prediction. However, when the constrained intra prediction mode is enabled and the adjacent block is a block reconstructed in the inter prediction mode, it can be determined that the adjacent block is unavailable. When the blocks reconstructed in the inter prediction mode and the blocks reconstructed in the intra prediction mode are mixed in the adjacent blocks, the samples of the blocks reconstructed in the intra prediction mode can be used as reference samples for performing intra prediction of the current block.

[0356] There is a coding tool that uses reference samples instead of intra prediction. For example, post-reconstruction filtering such as Hadamard transform domain filtering can use samples of neighboring blocks of the current block for filtering. When post-reconstruction filtering is performed while the constrained intra prediction mode is enabled, and the neighboring block is a block reconstructed in the inter prediction mode, it can be determined that the neighboring block is unavailable. When blocks reconstructed in the inter prediction mode and blocks reconstructed in the intra prediction mode are mixed in the neighboring blocks, samples of the blocks reconstructed in the intra prediction mode can be used as reference samples for performing post-reconstruction filtering relative to the current block.

[0357] In addition, when samples of inter-frame or intra-frame neighboring blocks are available, regardless of the constrained intra-frame prediction mode and regardless of whether the neighboring blocks are blocks reconstructed in inter-frame prediction mode or intra-frame prediction mode, post-reconstruction filtering for the current block can be performed by using the reconstructed samples of the neighboring blocks.

[0358] A method in which the video encoding apparatus 2100 and the video decoding apparatus 1900 according to an embodiment perform prediction according to a combined inter and intra prediction (CIIP) mode while the constrained intra prediction mode is enabled is as follows.

[0359] When the constrained intra prediction mode is enabled and the adjacent blocks are all blocks reconstructed in the inter prediction mode, the CIIP mode can be disabled to save bits for signaling the flag indicating the application of the CIIP mode and the related index. As another example, when the adjacent blocks of the current block are all reconstructed in the intra prediction mode, it can be limited to determine whether to use the CIIP mode.

[0360] When the adjacent block is reconstructed in the CIIP mode, the adjacent block is considered to be a block reconstructed in the inter prediction mode and is defined as an unavailable block. As another example, it can be determined whether to define the adjacent block as a block reconstructed in the inter prediction mode or a block reconstructed in the intra prediction mode according to the inter / intra weight of the adjacent block reconstructed in the CIIP mode. In detail, when the intra weight is 3 and the inter weight is 1, the adjacent block can be defined as a block reconstructed in the intra prediction mode and determined as an available block.

[0361] As another example, the neighboring block reconstructed in CIIP mode may be determined as a block reconstructed in intra prediction mode. In this case, during the deblocking filtering process, the boundary of the neighboring block may be filtered with the same boundary filter strength (BS) as the block reconstructed in intra prediction mode. In detail, as in the HEVC standard, the boundary filter strength at the boundary of the neighboring block reconstructed in CIIP mode may be set to 2.

[0362] Meanwhile, the above-described embodiments of the present disclosure may be written as a computer executable program that may be stored in a medium.

[0363] The medium can store computer executable programs continuously, or temporarily store computer executable programs or instructions for running or downloading. In addition, the medium can be any of a variety of recording media or storage media, in which single-chip or multi-chip hardware is combined, and the medium is not limited to the medium directly connected to the computer system, but can be distributed on the network. Examples of media include magnetic media such as hard disks, floppy disks and tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as optical magnetic floppy disks, and ROM, RAM and flash memory configured to store program instructions. Machine-readable storage media can be provided in the form of non-temporary storage media. Here, "non-temporary storage media" only means tangible devices and does not include signals (e.g., electromagnetic waves). The term does not distinguish between situations where data is semi-permanently stored in a storage medium and situations where data is temporarily stored in a storage medium. For example, a "non-temporary storage medium" may include a buffer for temporarily storing data.

[0364] Other examples of the medium include recording media and storage media managed by an application store that distributes applications or by a website, server, or the like that supplies or distributes other various types of software.

[0365] According to an embodiment, the method according to various embodiments disclosed in this specification can be provided by being included in a computer program product. A computer program product is a product that can be traded between a seller and a buyer. A computer program product can be distributed in the form of a machine-readable storage medium (e.g., a compact disc read-only memory (CD-ROM)), or through an application store (e.g., Play Store TM ) distribution (e.g., downloading or uploading), or directly or online distribution between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product (e.g., a downloadable application) may be at least temporarily generated or temporarily stored in a machine-readable storage medium, such as a memory of a manufacturer's server, an application store's server, or a relay server.

[0366] Although one or more embodiments of the present disclosure have been described with reference to the drawings, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope defined by the following claims.

Claims

1. A video decoding method, comprising: obtaining constrained prediction information indicating whether a constrained intra prediction mode is used; When the constrained intra prediction mode is used for the current block, generating prediction samples of the current block using samples of a first neighboring block decoded using the intra prediction mode without using samples of a second neighboring block decoded using the inter prediction mode; Generate a reconstructed sample of the current block using the predicted sample of the current block and the residual sample of the current block; when the constrained intra prediction mode is used for the current block and the prediction mode of the third neighboring block is not the intra prediction mode, determining a padding value corresponding to a position of the third neighboring block using reconstructed samples of the current block adjacent to a boundary between the current block and the third neighboring block among reconstructed samples of the current block; and Post-reconstruction filtering is performed on the reconstructed samples of the current block using the padding value.

2. A video decoding device, comprising: Memory, which stores instructions; A processor configured to execute the instructions to: obtaining constrained prediction information indicating whether a constrained intra prediction mode is used; When the constrained intra prediction mode is used for the current block, generating prediction samples of the current block using samples of a first neighboring block decoded using the intra prediction mode without using samples of a second neighboring block decoded using the inter prediction mode; Generate a reconstructed sample of the current block using the predicted sample of the current block and the residual sample of the current block; as well as When a constrained intra prediction mode is used for the current block and a prediction mode of the third neighboring block is not an intra prediction mode, a padding value corresponding to a position of the third neighboring block is determined using reconstructed samples of the current block adjacent to a boundary between the current block and the third neighboring block among the reconstructed samples of the current block, and post-reconstruction filtering is performed on the reconstructed samples of the current block using the padding value.

3. A video encoding method, comprising: generating constrained prediction information indicating whether a constrained intra prediction mode is used; When the constrained intra prediction mode is used for the current block, generating prediction samples of the current block using samples of a first neighboring block decoded using the intra prediction mode without using samples of a second neighboring block decoded using the inter prediction mode; Generate a reconstructed sample of the current block using the predicted sample of the current block and the residual sample of the current block; when the constrained intra prediction mode is used for the current block and the prediction mode of the third neighboring block is not the intra prediction mode, determining a padding value corresponding to a position of the third neighboring block using reconstructed samples of the current block adjacent to a boundary between the current block and the third neighboring block among reconstructed samples of the current block; as well as Post-reconstruction filtering is performed on the reconstructed samples of the current block using the padding value.

Citation Information

Patent Citations

  • Loop filtering across constrained intra block boundaries in video coding

    US9596461B2