Image decoding device and method, image encoding device and method
Geometric partitioning modes improve predictive encoding and decoding by aligning candidate partitioning modes based on template costs, enhancing compression and prediction performance while reducing data signaling and bit rate.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CO LTD
- Filing Date
- 2025-11-25
- Publication Date
- 2026-05-28
AI Technical Summary
Existing video encoding and decoding technologies face challenges in optimizing predictive encoding and decoding for current blocks, leading to inefficiencies in data signaling, bit rate, and image quality.
The use of geometric partitioning modes, where a geometric partitioning mode index is determined based on template costs for candidate partitioning modes, improving prediction performance and reducing the amount of data required for signaling in intra- and inter-prediction modes.
Enhances compression performance, prediction accuracy, and decoding quality by aligning candidate partition modes using extended templates, thereby optimizing the bitstream and reducing bit rate.
Smart Images

Figure KR2025019647_28052026_PF_FP_ABST
Abstract
Description
Device and method for decoding an image, device and method for encoding an image
[0001] The present disclosure relates to the field of image encoding and decoding, and specifically, to an apparatus and method for encoding or decoding an image by encoding or decoding using a template cost in relation to a geometric partitioning mode.
[0002] In video encoding and decoding, the video is divided into blocks, and each block is predictively encoded and predictedly decoded through inter-prediction.
[0003] Intra prediction is a technique that compresses images by eliminating spatial redundancy within the image. In intra prediction, predictions are made based on surrounding blocks that have already been encoded or decoded within the current image, and a residual block is generated by subtracting the prediction block resulting from the prediction from the current block.
[0004] Inter-prediction is a technique that compresses images by eliminating temporal redundancy between images. In inter-prediction, blocks of the current image are predicted using a reference image. The reference block most similar to the current block can be searched within a predetermined search range in the reference image. The current block is predicted based on the reference block, and a residual block is generated by subtracting the predicted block resulting from the prediction result from the current block.
[0005] In codecs such as H.264 AVC (Advanced Video Coding) and HEVC (High Efficiency Video Coding), the motion vectors of previously encoded blocks adjacent to the current block or blocks included in a previously encoded video are used as the motion vector predictor for the current block to predict the motion vector of the current block. The motion vector difference, which is the difference between the motion vector of the current block and the motion vector predictor, is signaled to the decoder side through a predetermined method.
[0006] Residual blocks generated through intra-prediction or inter-prediction are passed to a decoder after undergoing transformation and quantization. The decoder inversely quantizes and inversely transforms the residual blocks, and reconstructs the current block by combining the prediction block of the current block with the residual blocks. In certain cases, the decoder can filter the reconstructed current block to remove artifacts within it.
[0007] An image encoding method and apparatus and an image decoding method and apparatus according to one embodiment have the objective of improving the performance of predictive encoding and predictive decoding for a current block.
[0008] An image encoding method and apparatus and an image decoding method and apparatus according to one embodiment have the objective of reducing the amount of data required for signaling in an intra-prediction mode or an inter-prediction mode.
[0009] An image encoding method and apparatus and an image decoding method and apparatus according to one embodiment have the objective of reducing the bit rate of a bitstream.
[0010] An image encoding method and apparatus and an image decoding method and apparatus according to one embodiment have the objective of improving image quality by making the decoded image closer to the original image.
[0011] The technical problems to be solved by the present disclosure are not limited to those mentioned above, and other unmentioned technical problems will be clearly understood by those skilled in the art to which the present disclosure belongs from the description below.
[0012] In one embodiment of the present disclosure, an image decoding method is provided. The image decoding method may include the step of obtaining a geometric partitioning mode index of a current block from a bitstream. The image decoding method may include the step of sorting a plurality of candidate partitioning modes based on a template cost using an extended template of the current block extended in a direction parallel to the template of the current block and extended templates of the candidate reference blocks extended in a direction parallel to the templates of the candidate reference blocks. The image decoding method may include the step of determining, among the sorted plurality of candidate partitioning modes, the candidate partitioning mode indicated by the geometric partitioning mode index of the current block as the geometric partitioning mode of the current block. The image decoding method may include the step of obtaining a predicted block of the current block using the determined geometric partitioning mode of the current block.
[0013] In one embodiment of the present disclosure, an image encoding device may be provided comprising at least one memory storing at least one instruction and at least one processor operating according to at least one instruction. The at least one processor may obtain a geometric partition mode index of the current block from a bitstream. The at least one processor may sort a plurality of candidate partition modes based on a template cost using an extended template of the current block extended in a direction parallel to the template of the current block and extended templates of the candidate reference blocks extended in a direction parallel to the templates of the candidate reference blocks. The at least one processor may determine, among the sorted plurality of candidate partition modes, the candidate partition mode indicated by the geometric partition mode index of the current block as the geometric partition mode of the current block. The at least one processor may obtain a predicted block of the current block using the determined geometric partition mode of the current block.
[0014] In one embodiment of the present disclosure, an image encoding method may be provided. The image encoding method may include the step of aligning a plurality of candidate partition modes based on a template cost using an extended template of the current block extended in a direction parallel to the template of the current block and extended templates of the candidate reference blocks extended in a direction parallel to the candidate reference blocks. The image encoding method may include the step of determining a geometric partition mode index of the current block that indicates a candidate partition mode for predicting the current block among the aligned plurality of candidate partition modes. The image encoding method may include the step of generating a bitstream including a geometric partition mode index for the current block.
[0015] In one embodiment of the present disclosure, an image encoding device may be provided comprising at least one memory storing at least one instruction and at least one processor operating according to said at least one instruction. The at least one processor may align a plurality of template costs corresponding to a plurality of candidate partition modes based on template costs by using an extended template of said current block extended in a direction parallel to the template of said current block and extended templates of said candidate reference blocks extended in a direction parallel to the candidate reference blocks. The at least one processor may determine a geometric partition mode index of said current block indicating a candidate partition mode for predicting said current block among the aligned plurality of candidate partition modes. The at least one processor may generate a bitstream including a geometric partition mode index for said current block.
[0016] In one embodiment of the present disclosure, a computer-readable recording medium may be provided for storing a bitstream generated by an image encoding method. The bitstream may include a geometric partition mode index of a current block. The geometric partition mode index of the current block may be an index indicating one of a plurality of candidate partition modes aligned based on a template cost, using an extended template of the current template extended in a direction parallel to the template of the current block and extended templates of the candidate reference blocks extended in a direction parallel to the templates of the candidate reference blocks. The candidate partition mode indicated by the geometric partition mode index of the current block may be characterized as being used for prediction of the current block.
[0017] According to one embodiment of the present disclosure, in the process of decoding and encoding an image, the compression performance of the image can be improved, the prediction performance can be improved, and the decoding quality of the image can be improved.
[0018] FIG. 1 is a block diagram of an image decoding device according to one embodiment.
[0019] FIG. 2 is a block diagram of an image encoding device according to one embodiment.
[0020] FIG. 3 illustrates a process of determining at least one encoding unit by dividing the current encoding unit according to one embodiment.
[0021] FIG. 4 illustrates a process of determining at least one encoding unit by dividing a encoding unit that is in the shape of a non-square according to one embodiment.
[0022] FIG. 5 illustrates a process of dividing a encoding unit based on at least one of block shape information and division shape mode information according to one embodiment.
[0023] FIG. 6 illustrates a method for determining a predetermined encoding unit among an odd number of encoding units according to one embodiment.
[0024] FIG. 7 illustrates the order in which a plurality of encoding units are processed when a current encoding unit is divided to determine a plurality of encoding units according to one embodiment.
[0025] FIG. 8 illustrates a process for determining that, according to one embodiment, when the encoding unit cannot be processed in a predetermined order, the current encoding unit is divided into an odd number of encoding units.
[0026] FIG. 9 illustrates a process of determining at least one encoding unit by dividing a first encoding unit according to one embodiment.
[0027] FIG. 10 illustrates that, according to one embodiment, the shape that can be divided is limited when a second encoding unit of a non-square shape determined by dividing a first encoding unit satisfies a predetermined condition.
[0028] FIG. 11 illustrates a process of dividing square-shaped encoding units when, according to one embodiment, the divided shape mode information cannot represent division into four square-shaped encoding units.
[0029] FIG. 12 illustrates that, according to one embodiment, the processing order between a plurality of encoding units may vary depending on the division process of the encoding unit.
[0030] FIG. 13 illustrates a process in which, according to one embodiment, a encoding unit is recursively divided to determine a plurality of encoding units, and the depth of the encoding unit is determined as the shape and size of the encoding unit change.
[0031] FIG. 14 illustrates a depth and part index (hereinafter PID) for distinguishing between coding units that can be determined according to the shape and size of the coding units according to one embodiment.
[0032] FIG. 15 illustrates that a plurality of encoding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment.
[0033] FIG. 16 illustrates the encoding units that can be determined for each picture when the combination of forms in which the encoding units can be divided according to one embodiment is different for each picture.
[0034] FIG. 17 illustrates various forms of encoding units that can be determined based on partitioned form mode information expressed as binary code according to one embodiment.
[0035] FIG. 18 illustrates another form of encoding unit that can be determined based on partitioned form mode information represented by binary code according to one embodiment.
[0036] FIG. 19 is a block diagram of an image encoding and decoding system that performs loop filtering according to one embodiment.
[0037] FIG. 20 is a block diagram illustrating the configuration of an image decoding device according to one embodiment.
[0038] FIG. 21 is a diagram illustrating the operation of decoding / encoding a current block using a geometric partitioning mode according to one embodiment.
[0039] FIG. 22 is a drawing for illustrating examples of a plurality of geometric division modes according to one embodiment.
[0040] FIG. 23 is a diagram illustrating a template in template matching according to one embodiment.
[0041] FIG. 24 is a diagram illustrating the operation of determining a geometric division mode using a template according to one embodiment.
[0042] FIG. 25 is a diagram illustrating the operation of determining a geometric division mode using a template according to one embodiment.
[0043] FIG. 26 is a diagram illustrating the operation of determining a geometric partitioning mode using an extended template according to one embodiment.
[0044] FIG. 27 is a diagram illustrating the operation of determining a geometric partitioning mode using an extended template according to one embodiment.
[0045] FIG. 28 is a diagram illustrating the operation of determining a geometric partitioning mode using an extended template according to one embodiment.
[0046] FIG. 29 is a diagram illustrating the operation of determining a geometric partitioning mode using an extended template according to one embodiment.
[0047] FIG. 30 is a flowchart of an image decoding method according to one embodiment.
[0048] FIG. 31 is a block diagram illustrating the configuration of an image encoding device according to one embodiment.
[0049] FIG. 32 is a flowchart of an image encoding method according to one embodiment.
[0050] The present disclosure is capable of various modifications and may have various embodiments, and embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the embodiments of the present disclosure, and the present disclosure may include all modifications, equivalents, and substitutions that fall within the spirit and technical scope of the various embodiments.
[0051] In describing the embodiments, if it is determined that a detailed description of related prior art could unnecessarily obscure the gist of the present disclosure, such detailed description may be omitted. Additionally, numbers used in the description of the embodiments (e.g., first, second, etc.) may correspond to identification symbols to distinguish one component from another.
[0052] In the present disclosure, the expression “at least one of a, b, or c” may refer to “a”, “b”, “c”, “a and b”, “a and c”, “b and c”, “a, b, and c all”, or variations thereof.
[0053] In the present disclosure, when one component is described as being "connected" or "connected" to another component, the one component may be directly connected to or directly connected to another component, but unless specifically stated otherwise, it may be connected or connected through another component in between.
[0054] In this disclosure, components expressed as ‘~part (unit)’, ‘module’, etc. may consist of two or more components combined into a single component, or a single component may be divided into two or more more subdivided components. Additionally, each component described below may additionally perform some or all of the functions of other components in addition to the primary function it is responsible for, and some of the primary functions of each component may be exclusively performed by other components.
[0055] In the present disclosure, 'image' may refer to a picture, a still image, a frame, a video composed of a plurality of consecutive still images, or a video.
[0056] In the present disclosure, 'sample' may refer to data assigned to a sampling location of an image that is subject to processing. For example, a pixel within a frame in a spatial domain may correspond to a sample. A unit comprising a plurality of samples may be defined as a block.
[0057] Hereinafter, with reference to FIGS. 1 to 19, an image encoding method and apparatus based on a tree structure encoding unit and a conversion unit according to one embodiment, an image decoding method and apparatus are disclosed.
[0058] FIG. 1 illustrates a block diagram of an image decoding device (100) according to one embodiment.
[0059] The video decoding device (100) may include a bitstream acquisition unit (110) and a decoding unit (120). The bitstream acquisition unit (110) and the decoding unit (120) may include at least one processor. Additionally, the bitstream acquisition unit (110) and the decoding unit (120) may include a memory that stores instructions to be executed by at least one processor.
[0060] The bitstream acquisition unit (110) can receive a bitstream. The bitstream contains information in which an image is encoded by an image encoding device (200) described later. Additionally, the bitstream can be transmitted from the image encoding device (200). The image encoding device (200) and the image decoding device (100) can be connected via wired or wireless connection, and the bitstream acquisition unit (110) can receive the bitstream via wired or wireless connection. The bitstream acquisition unit (110) can receive the bitstream from a storage medium such as an optical medium or a hard disk. The decoding unit (120) can restore the image based on information obtained from the received bitstream. The decoding unit (120) can obtain syntax elements for restoring the image from the bitstream. The decoding unit (120) can restore the image based on the syntax elements.
[0061] To explain in detail the operation of the video decoding device (100), the bitstream acquisition unit (110) can receive a bitstream.
[0062] The image decoder (100) can perform an operation of obtaining an empty string corresponding to a partitioning mode of the encoding unit from a bitstream. The image decoder (100) can also perform an operation of determining a partitioning rule for the encoding unit. Additionally, the image decoder (100) can perform an operation of partitioning the encoding unit into a plurality of encoding units based on at least one of the empty string corresponding to the partitioning mode and the partitioning rule. To determine the partitioning rule, the image decoder (100) can determine an allowable first range of the size of the encoding unit according to the ratio of the width and height of the encoding unit. To determine the partitioning rule, the image decoder (100) can determine an allowable second range of the size of the encoding unit according to the partitioning mode of the encoding unit.
[0063] In the following, the division of a encoding unit according to one embodiment of the present disclosure will be described in detail.
[0064] First, a picture may be divided into one or more slices or one or more tiles. A slice or a tile may be a sequence of one or more Coding Tree Units (CTUs). Depending on the embodiment, a slice may include one or more tiles, and a slice may include one or more Coding Tree Units. A slice containing one or more tiles may be determined within the picture.
[0065] In contrast to the Max Coding Unit (CTU), there is the Max Coding Tree Block (CTB). A Max Coding Tree Block (CTB) refers to an NxN block containing NxN samples (where N is an integer). Each color component can be divided into one or more Max Coding Tree Blocks.
[0066] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), the maximum encoding unit (CTU) is a unit comprising a maximum encoding block for luminance samples and two corresponding maximum encoding blocks for chroma samples, and syntax structures used to encode the luminance samples and chroma samples. When a picture is a monochrome picture, the maximum encoding unit is a unit comprising a maximum encoding block for monochrome samples and syntax structures used to encode the monochrome samples. When a picture is encoded in color planes separated by color components, the maximum encoding unit is a unit comprising the picture and syntax structures used to encode the samples of the picture.
[0067] A single maximum coding block (CTB) can be divided into MxN coding blocks containing MxN samples (M and N are integers).
[0068] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) is a unit comprising a coding block for luminance samples and two coding blocks for corresponding chroma samples, and syntax structures used to encode the luminance samples and chroma samples. When a picture is a monochrome picture, a coding unit is a unit comprising a coding block for monochrome samples and syntax structures used to encode the monochrome samples. When a picture is a picture encoded in color planes separated by color components, a coding unit is a unit comprising the picture and syntax structures used to encode the samples of the picture.
[0069] As explained above, the maximum encoding block and the maximum encoding unit are distinct concepts, and the encoding block and the encoding unit are distinct concepts. That is, the (maximum) encoding unit refers to a data structure that includes the (maximum) encoding block containing the corresponding sample and the corresponding syntax structure. However, since a person skilled in the art can understand that the (maximum) encoding unit or the (maximum) encoding block refers to a block of a predetermined size containing a predetermined number of samples, the maximum encoding block and the maximum encoding unit, or the encoding block and the encoding unit, are referred to without distinction in the following specification unless there are special circumstances.
[0070] The image can be divided into Coding Tree Units (CTUs). The size of the CTU can be determined based on information obtained from the bitstream. The shape of the CTU can be a square of equal size, but it is not limited to this.
[0071] For example, information about the maximum size of a luma-encoded block can be obtained from a bitstream. For example, the maximum size of a luma-encoded block indicated by the information about the maximum size of a luma-encoded block may be one of 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, or 256x256.
[0072] For example, information regarding the maximum size of a two-divisionable luminance coding block and the difference in luminance block size can be obtained from a bitstream. The information regarding the difference in luminance block size may represent the size difference between the maximum luminance coding unit and the maximum two-divisionable luminance coding block. Therefore, by combining the information regarding the maximum size of the two-divisionable luminance coding block obtained from the bitstream with the information regarding the difference in luminance block size, the size of the maximum luminance coding unit can be determined. Using the size of the maximum luminance coding unit, the size of the maximum chroma coding unit can also be determined. For example, if the Y:Cb:Cr ratio according to the color format is 4:2:0, the size of the chroma block may be half the size of the luminance block, and similarly, the size of the maximum chroma coding unit may be half the size of the maximum luminance coding unit.
[0073] According to one embodiment, information regarding the maximum size of a binary splittable luminous encoding block is obtained from a bitstream, so the maximum size of the binary splittable luminous encoding block can be determined variably. Alternatively, the maximum size of a ternary splittable luminous encoding block can be fixed. For example, the maximum size of a ternary splittable luminous encoding block in picture I may be 32x32, and the maximum size of a ternary splittable luminous encoding block in picture P or picture B may be 64x64.
[0074] Additionally, the maximum encoding unit can be hierarchically divided into encoding units based on splitting mode information obtained from the bitstream. As splitting mode information, at least one of information indicating whether it is a quad split, information indicating whether it is a multi-split, splitting direction information, and splitting type information can be obtained from the bitstream.
[0075] For example, information indicating whether quad splitting is performed can indicate whether the current encoding unit will be quad split or not.
[0076] If the current encoding unit is not quad-splitting, information indicating multi-splitting can indicate whether the current encoding unit will no longer be split (NO_SPLIT) or whether it will be binary / ternary split.
[0077] If the current encoding unit is binary or binary split, the splitting direction information indicates that the current encoding unit is split in either the horizontal or vertical direction.
[0078] If the current encoding unit is split horizontally or vertically, the split type information indicates that the current encoding unit is split into binary or binary splits.
[0079] The splitting mode of the current encoding unit can be determined based on the splitting direction information and the splitting type information. The splitting mode when the current encoding unit is binary split in the horizontal direction can be determined as binary horizontal splitting (SPLIT_BT_HOR), when it is territorial split in the horizontal direction as territorial horizontal splitting (SPLIT_TT_HOR), when it is binary split in the vertical direction as binary vertical splitting (SPLIT_BT_VER), and when it is territorial split in the vertical direction as territorial vertical splitting (SPLIT_TT_VER).
[0080] The image decoding device (100) can obtain splitting mode information from a bitstream from a single empty string. The form of the bitstream 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. The empty string represents information as a sequence of binary numbers. The empty string may consist of at least one bit. The image decoding device (100) can obtain splitting mode information corresponding to the empty string based on a splitting rule. Based on the single empty string, the image decoding device (100) can determine whether to quad split the encoding unit, whether not to split it, or the splitting direction and splitting type.
[0081] A coding unit may be smaller than or equal to a maximum coding unit. For example, since the maximum coding unit is a coding unit having the maximum size, it is also a coding unit. If the segmentation mode information for the maximum coding unit indicates that it is not segmented, the coding unit determined from the maximum coding unit has the same size as the maximum coding unit. If the segmentation mode information for the maximum coding unit indicates that it is segmented, the maximum coding unit may be segmented into coding units. Additionally, if the segmentation mode information for a coding unit indicates segmentation, the coding units may be segmented into coding units of smaller size. However, the segmentation of the image is not limited to this, and the maximum coding unit and the coding unit may not be distinguished. The segmentation of coding units is explained in more detail in FIGS. 3 through 16.
[0082] Additionally, one or more prediction blocks for prediction may be determined from the coding unit. The prediction blocks may be equal to or smaller than the coding unit. Additionally, one or more transformation blocks for transformation may be determined from the coding unit. The transformation blocks may be equal to or smaller than the coding unit.
[0083] The shape and size of the transformation block and the prediction block may not be related to each other.
[0084] In another embodiment, prediction can be performed using the encoding unit as a prediction block. Additionally, conversion can be performed using the encoding unit as a conversion block.
[0085] The division of the encoding unit is described in more detail in FIGS. 3 through 16. The current block and surrounding block of the present disclosure may represent one of a maximum encoding unit, an encoding unit, a prediction block, and a transformation block. Additionally, the current block or the current encoding unit is a block currently undergoing decoding or encoding, or a block currently undergoing division. The surrounding block may be a block restored prior to the current block. The surrounding block may be spatially or temporally adjacent to the current block. The surrounding block may be located on one of the lower-left, left, upper-left, upper, upper-right, right, or lower-right sides of the current block.
[0086] FIG. 3 illustrates a process in which an image decoding device (100) divides a current encoding unit to determine at least one encoding unit according to one embodiment.
[0087] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N. Here, N may be a positive integer. Block shape information is information indicating at least one of the shape, orientation, width, and height ratio or size of the encoding unit.
[0088] The shape of the encoding unit may include square and non-square. When the width and height of the encoding unit are the same (i.e., when the block shape of the encoding unit is 4Nx4N), the image decoder (100) may determine the block shape information of the encoding unit as square. The image decoder (100) may determine the shape of the encoding unit as non-square.
[0089] When the width and height of the encoding unit are different (i.e., when the block shape of the encoding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the image decoder (100) can determine the block shape information of the encoding unit as non-square. When the shape of the encoding unit is non-square, the image decoder (100) can determine the ratio of the width and height among the block shape information of the encoding 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. Additionally, based on the width and height of the encoding unit, the image decoding device (100) can determine whether the encoding unit is in a horizontal direction or a vertical direction. Additionally, based on at least one of the width, height, or width of the encoding unit, the image decoding device (100) can determine the size of the encoding unit.
[0090] According to one embodiment, the image decoding device (100) can determine the form of the encoding unit using block form information and can determine how the encoding unit is divided using division form mode information. That is, depending on what block form the block form information used by the image decoding device (100) represents, the method of dividing the encoding unit represented by the division form mode information can be determined.
[0091] The video decoder (100) can obtain split-form mode information from the bitstream. However, it is not limited thereto, and the video decoder (100) and the video encoding device (200) can determine pre-agreed split-form mode information based on block form information. The video decoder (100) can determine pre-agreed split-form mode information for a maximum encoding unit or a minimum encoding unit. For example, the video decoder (100) can determine the split-form mode information for the maximum encoding unit as quad split. Additionally, the video decoder (100) can determine the split-form mode information for the minimum encoding unit as "not split." Specifically, the video decoder (100) can determine the size of the maximum encoding unit to be 256x256. The video decoder (100) can determine the pre-agreed split-form mode information as quad split. Quad split is a split-form mode that divides both the width and height of the encoding unit into two equal parts. The image decoder (100) can obtain a 128x128 size encoding unit from a 256x256 size encoding unit based on the division mode information. Additionally, the image decoder (100) can determine the size of the minimum encoding unit to be 4x4. The image decoder (100) can obtain division mode information indicating "not divided" for the minimum encoding unit.
[0092] According to one embodiment, the image decoding device (100) may use block shape information indicating that the current encoding unit is in the shape of a square. For example, the image decoding device (100) may determine whether to not divide the square encoding unit, to divide it vertically, to divide it horizontally, or to divide it into four encoding units, etc., based on the division shape mode information. Referring to FIG. 3, when the block shape information of the current encoding unit (300) indicates a square shape, the decoding unit (120) may not divide the encoding unit (310a) having the same size as the current encoding unit (300) based on the division shape mode information indicating that it is not divided, or may determine the divided encoding units (310b, 310c, 310d, 310e, 310f, etc.) based on the division shape mode information indicating a predetermined division method.
[0093] Referring to FIG. 3, the image decoding device (100) can determine two encoding units (310b) that divide the current encoding unit (300) in the vertical direction based on splitting form mode information indicating that it is divided in the vertical direction according to one embodiment. The image decoding device (100) can determine two encoding units (310c) that divide the current encoding unit (300) in the horizontal direction based on splitting form mode information indicating that it is divided in the horizontal direction. The image decoding device (100) can determine four encoding units (310d) that divide the current encoding unit (300) in the vertical direction and the horizontal direction based on splitting form mode information indicating that it is divided in the vertical direction and the horizontal direction. The image decoding device (100) can determine three encoding units (310e) that divide the current encoding unit (300) in the vertical direction based on splitting form mode information indicating that it is divided ternary in the vertical direction according to one embodiment. The image decoding device (100) can determine three encoding units (310f) that divide the current encoding unit (300) horizontally based on division form mode information indicating horizontal division. However, the division form in which the square encoding unit can be divided should not be interpreted as being limited to the form described above, and may include various forms that the division form mode information can represent. The specific division forms in which the square encoding unit is divided will be described in detail below through various embodiments.
[0094] FIG. 4 illustrates a process in which, according to one embodiment, an image decoding device (100) divides a non-square-shaped encoding unit to determine at least one encoding unit.
[0095] According to one embodiment, the image decoding device (100) may use block shape information indicating that the current encoding unit is in a non-square shape. The image decoding device (100) may determine whether to not divide the current encoding unit of the non-square shape or to divide it in a predetermined way according to the division shape mode information. Referring to FIG. 4, when the block shape information of the current encoding unit (400 or 450) indicates a non-square shape, the image decoding device (100) may determine an encoding unit (410 or 460) having the same size as the current encoding unit (400 or 450) based on division shape mode information indicating that it is not divided, or determine divided encoding units (420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c) based on division shape mode information indicating a predetermined division method. A predetermined division method in which a non-square encoding unit is divided will be specifically described below through various embodiments.
[0096] According to one embodiment, the image decoding device (100) can determine the form in which the encoding unit is divided using the division form mode information, and in this case, the division form mode information may indicate the number of at least one encoding unit generated by dividing the encoding unit. Referring to FIG. 4, when the division form mode information indicates that the current encoding unit (400 or 450) is divided into two encoding units, the image decoding device (100) can determine two encoding units (420a, 420b, or 470a, 470b) included in the current encoding unit by dividing the current encoding unit (400 or 450) based on the division form mode information.
[0097] According to one embodiment, when an image decoding device (100) divides a current encoding unit (400 or 450) in a non-square shape based on division shape mode information, the image decoding device (100) may divide the current encoding unit by considering the position of the long side of the current encoding unit (400 or 450) in a non-square shape. For example, the image decoding device (100) may determine a plurality of encoding units by dividing the current encoding unit (400 or 450) in a direction that divides the long side of the current encoding unit (400 or 450) by considering the shape of the current encoding unit (400 or 450).
[0098] According to one embodiment, when the segmentation mode information indicates that the encoding unit is divided into an odd number of blocks (terminal segmentation), the image decoder (100) can determine an odd number of encoding units included in the current encoding unit (400 or 450). For example, when the segmentation mode information indicates that the current encoding unit (400 or 450) is divided into three encoding units, the image decoder (100) can divide the current encoding unit (400 or 450) into three encoding units (430a, 430b, 430c, 480a, 480b, 480c).
[0099] According to one embodiment, the ratio of the width to the height of the current encoding unit (400 or 450) may be 4:1 or 1:4. When the ratio of the width to the height is 4:1, the block shape information may be in the horizontal direction because the width is longer than the height. When the ratio of the width to the height is 1:4, the block shape information may be in the vertical direction because the width is shorter than the height. The image decoder (100) may determine to divide the current encoding unit into an odd number of blocks based on the division shape mode information. Additionally, the image decoder (100) may determine the division direction of the current encoding unit (400 or 450) based on the block shape information of the current encoding unit (400 or 450). For example, if the current encoding unit (400) is in a vertical direction, the image decoding device (100) can determine the encoding units (430a, 430b, 430c) by dividing the current encoding unit (400) in a horizontal direction. Also, if the current encoding unit (450) is in a horizontal direction, the image decoding device (100) can determine the encoding units (480a, 480b, 480c) by dividing the current encoding unit (450) in a vertical direction.
[0100] According to one embodiment, the image decoding device (100) may determine an odd number of encoding units included in the current encoding unit (400 or 450), and the sizes of the determined encoding units may not all be the same. For example, among the determined odd number of encoding units (430a, 430b, 430c, 480a, 480b, 480c), the size of a certain encoding unit (430b or 480b) may have a different size from the other encoding units (430a, 430c, 480a, 480c). That is, the current encoding unit (400 or 450) can be divided and determined as a encoding unit, and the encoding unit can have multiple types of sizes, and in some cases, an odd number of encoding units (430a, 430b, 430c, 480a, 480b, 480c) may each have different sizes.
[0101] According to one embodiment, if the segmentation mode information indicates that the encoding unit is divided into an odd number of blocks, the image decoding device (100) can determine the odd number of encoding units included in the current encoding unit (400 or 450), and furthermore, the image decoding device (100) can impose a predetermined limit on at least one encoding unit among the odd number of encoding units generated by the segmentation. Referring to FIG. 4, the image decoding device (100) can perform the decoding process for the central encoding unit (430b, 480b) among the three encoding units (430a, 430b, 430c, 480a, 480b, 480c) generated by the segmentation of the current encoding unit (400 or 450) differently from the other encoding units (430a, 430c, 480a, 480c). For example, the video decoding device (100) may restrict the centrally located encoding unit (430b, 480b) from being further divided unlike other encoding units (430a, 430c, 480a, 480c), or restrict it to being divided only a predetermined number of times.
[0102] FIG. 5 illustrates a process in which an image decoding device (100) divides a encoding unit based on at least one of block form information and division form mode information according to one embodiment.
[0103] According to one embodiment, the image decoding device (100) may determine whether to divide a square-shaped first encoding unit (500) into encoding units or not to divide it based on at least one of block shape information and division shape mode information. According to one embodiment, if the division shape mode information indicates that the first encoding unit (500) is divided in a horizontal direction, the image decoding device (100) may divide the first encoding unit (500) in a horizontal direction to determine a second encoding unit (510). The first encoding unit, the second encoding unit, and the third encoding unit used according to one embodiment are terms used to understand the relationship before and after division between the encoding units. For example, if the first encoding unit is divided, the second encoding unit may be determined, and if the second encoding unit is divided, the third encoding unit may be determined. In the following, the relationship between the first encoding unit, the second encoding unit, and the third encoding unit used may be understood as following the features described above.
[0104] According to one embodiment, the image decoding device (100) may determine whether to divide the determined second encoding unit (510) into encoding units or not to divide it based on the division shape mode information. Referring to FIG. 5, the image decoding device (100) may divide the determined non-square second encoding unit (510) into at least one third encoding unit (520a, 520b, 520c, 520d, etc.) by dividing the first encoding unit (500) based on the division shape mode information, or may not divide the second encoding unit (510). The image decoding device (100) can obtain segmentation mode information, and the image decoding device (100) can divide a first encoding unit (500) based on the obtained segmentation mode information to divide a plurality of second encoding units (e.g., 510) of various forms, and the second encoding units (510) can be divided according to the method in which the first encoding unit (500) was divided based on the segmentation mode information. According to one embodiment, when the first encoding unit (500) is divided into a second encoding unit (510) based on the segmentation mode information for the first encoding unit (500), the second encoding unit (510) can also be divided into a third encoding unit (e.g., 520a, 520b, 520c, 520d, etc.) based on the segmentation mode information for the second encoding unit (510). That is, the encoding unit can be recursively partitioned based on partitioning mode information associated with each encoding unit. Thus, a square encoding unit can be determined from a non-square encoding unit, and a non-square encoding unit can be determined by recursively partitioning this square encoding unit.
[0105] Referring to FIG. 5, among the odd number of third encoding units (520b, 520c, 520d) determined by dividing a second encoding unit (510) of a non-square shape, a predetermined encoding unit (e.g., a central encoding unit or a square encoding unit) may be recursively divided. According to one embodiment, a third encoding unit (520b) of a non-square shape, which is one of the odd number of third encoding units (520b, 520c, 520d), may be divided horizontally into a plurality of fourth encoding units. A fourth encoding unit (530b or 530d) of a non-square shape, which is one of the plurality of fourth encoding units (530a, 530b, 530c, 530d), may again be divided into a plurality of encoding units. For example, a non-square fourth encoding unit (530b or 530d) may be further divided into an odd number of encoding units. Methods that can be used for the recursive division of encoding units will be described later through various embodiments.
[0106] According to one embodiment, the image decoding device (100) may divide each of the third encoding units (520a, 520b, 520c, 520d, etc.) into encoding units based on the division shape mode information. Additionally, the image decoding device (100) may decide not to divide the second encoding unit (510) based on the division shape mode information. According to one embodiment, the image decoding device (100) may divide the non-square second encoding unit (510) into an odd number of third encoding units (520b, 520c, 520d). The image decoding device (100) may place a certain limit on a certain third encoding unit among the odd number of third encoding units (520b, 520c, 520d). For example, the video decoding device (100) may limit the encoding unit (520c) located in the middle of the odd number of third encoding units (520b, 520c, 520d) so that it is not further divided or is limited to being divided a set number of times.
[0107] Referring to FIG. 5, the image decoding device (100) may limit the middle encoding unit (520c) among the odd number of third encoding units (520b, 520c, 520d) included in the second encoding unit (510) of a non-square shape to no longer be divided, to be divided into a predetermined division form (e.g., divided into only 4 encoding units or divided into a form corresponding to the divided form of the second encoding unit (510)), or to be divided only a predetermined number of times (e.g., divided only n times, n > 0). However, the above limitation on the middle encoding unit (520c) is merely a simple example and should not be interpreted as being limited to the above-described examples, but should be interpreted as including various limitations that allow the middle encoding unit (520c) to be decoded differently from the other encoding units (520b, 520d).
[0108] According to one embodiment, the image decoding device (100) can obtain splitting form mode information used to split the current encoding unit at a predetermined location within the current encoding unit.
[0109] FIG. 6 illustrates a method for an image decoding device (100) to determine a predetermined encoding unit among an odd number of encoding units according to one embodiment.
[0110] Referring to FIG. 6, the segmentation mode information of the current encoding unit (600, 650) can be obtained from a sample at a specific location among a plurality of samples included in the current encoding unit (600, 650) (e.g., a sample located in the center (640, 690)). However, the specific location within the current encoding unit (600) where at least one of such segmentation mode information can be obtained should not be interpreted as being limited to the center location shown in FIG. 6, and should be interpreted as including various locations within the current encoding unit (600) (e.g., top, bottom, left, right, top-left, bottom-left, top-right, or bottom-right, etc.). The image decoding device (100) can obtain the segmentation mode information obtained from the specific location and decide whether to divide the current encoding unit into encoding units of various shapes and sizes or not to divide it.
[0111] According to one embodiment, the image decoding device (100) may select one of the encoding units when the current encoding unit is divided into a predetermined number of encoding units. There may be various methods for selecting one of the multiple encoding units, and such methods will be described later through various embodiments below.
[0112] According to one embodiment, the image decoding device (100) can divide the current encoding unit into a plurality of encoding units and determine the encoding unit at a predetermined position.
[0113] According to one embodiment, the image decoding device (100) may use information indicating the location of each of the odd number of encoding units to determine the encoding unit located in the middle among the odd number of encoding units. Referring to FIG. 6, the image decoding device (100) may divide the current encoding unit (600) or the current encoding unit (650) to determine the odd number of encoding units (620a, 620b, 620c) or the odd number of encoding units (660a, 660b, 660c). The image decoding device (100) may determine the middle encoding unit (620b) or the middle encoding unit (660b) by using information regarding the location of the odd number of encoding units (620a, 620b, 620c) or the odd number of encoding units (660a, 660b, 660c). For example, the image decoding device (100) can determine the centrally located encoding unit (620b) by determining the positions of the encoding units (620a, 620b, 620c) based on information indicating the positions of a predetermined sample included in the encoding units (620a, 620b, 620c). Specifically, the image decoding device (100) can determine the centrally located encoding unit (620b) by determining the positions of the encoding units (620a, 620b, 620c) based on information indicating the positions of the upper-left samples (630a, 630b, 630c) of the encoding units (620a, 620b, 620c).
[0114] According to one embodiment, information indicating the location of the upper-left sample (630a, 630b, 630c) included in each of the encoding units (620a, 620b, 620c) may include information regarding the location or coordinates within the picture of the encoding units (620a, 620b, 620c). According to one embodiment, information indicating the location of the upper-left sample (630a, 630b, 630c) included in each of the encoding units (620a, 620b, 620c) may include information indicating the width or height of the encoding units (620a, 620b, 620c) included in the current encoding unit (600), and such width or height may correspond to information indicating the difference between coordinates within the picture of the encoding units (620a, 620b, 620c). That is, the image decoding device (100) can determine the centrally located encoding unit (620b) by directly using information about the position or coordinates of the encoding units (620a, 620b, 620c) within the picture, or by using information about the width or height of the encoding unit corresponding to the difference value between the coordinates.
[0115] According to one embodiment, information indicating the location of the upper left sample (630a) of the upper encoding unit (620a) may be represented by the (xa, ya) coordinates, information indicating the location of the upper left sample (530b) of the middle encoding unit (620b) may be represented by the (xb, yb) coordinates, and information indicating the location of the upper left sample (630c) of the lower encoding unit (620c) may be represented by the (xc, yc) coordinates. The image decoding device (100) can determine the middle encoding unit (620b) using the coordinates of the upper left samples (630a, 630b, 630c) included in each of the encoding units (620a, 620b, 620c). For example, when the coordinates of the upper-left samples (630a, 630b, 630c) are sorted in ascending or descending order, the encoding unit (620b) containing the coordinates (xb, yb) of the sample (630b) located in the middle can be determined as the encoding unit located in the middle among the encoding units (620a, 620b, 620c) determined by dividing the current encoding unit (600). However, the coordinates indicating the position of the upper-left samples (630a, 630b, 630c) may represent absolute positions within the picture, and furthermore, based on the position of the upper-left sample (630a) of the upper-left of the upper-left of the middle encoding unit (620b), the (dxb, dyb) coordinates, which represent the relative position of the upper-left sample (630b) of the middle encoding unit (620b), and the (dxc, dyc) coordinates, which represent the relative position of the upper-left sample (630c) of the lower encoding unit (620c) may also be used. In addition, the method of determining the encoding unit of a predetermined position by using the coordinates of the corresponding sample as information indicating the position of the sample included in the encoding unit should not be interpreted as being limited to the method described above, but should be interpreted as various arithmetic methods that can utilize the coordinates of the sample.
[0116] According to one embodiment, the image decoding device (100) can divide the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c) and select an encoding unit among the encoding units (620a, 620b, 620c) according to a predetermined criterion. For example, the image decoding device (100) can select an encoding unit (620b) of a different size among the encoding units (620a, 620b, 620c).
[0117] According to one embodiment, the image decoding device (100) can determine the width or height of each of the encoding units (620a, 620b, 620c) using the (xa, ya) coordinates, which are information indicating the location of the upper left sample (630a) of the upper encoding unit (620a), the (xb, yb) coordinates, which are information indicating the location of the upper left sample (630b) of the middle encoding unit (620b), and the (xc, yc) coordinates, which are information indicating the location of the upper left sample (630c) of the lower encoding unit (620c). The image decoding device (100) can determine the size of each of the encoding units (620a, 620b, 620c) using the (xa, ya), (xb, yb), and (xc, yc) coordinates, which are information indicating the location of the encoding units (620a, 620b, 620c). According to one embodiment, the image decoding device (100) may determine the width of the upper encoding unit (620a) as the width of the current encoding unit (600). The image decoding device (100) may determine the height of the upper encoding unit (620a) as yb-ya. According to one embodiment, the image decoding device (100) may determine the width of the middle encoding unit (620b) as the width of the current encoding unit (600). The image decoding device (100) may determine the height of the middle encoding unit (620b) as yc-yb. According to one embodiment, the image decoding device (100) may determine the width or height of the lower encoding unit using the width or height of the current encoding unit and the width and height of the upper encoding unit (620a) and the middle encoding unit (620b). The video decoding device (100) can determine a encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (620a, 620b, 620c).Referring to FIG. 6, the image decoding device (100) can determine a middle encoding unit (620b) having a size different from that of the upper encoding unit (620a) and the lower encoding unit (620c) as the encoding unit of a predetermined position. However, since the process of the image decoding device (100) described above determining the encoding unit having a size different from other encoding units is merely one embodiment of determining the encoding unit of a predetermined position using the size of the encoding unit determined based on sample coordinates, various processes of determining the encoding unit of a predetermined position by comparing the size of the encoding unit determined according to the predetermined sample coordinates may be used.
[0118] The image decoding device (100) can determine the width or height of each of the encoding units (660a, 660b, 660c) using the (xd, yd) coordinates, which are information indicating the location of the upper-left sample (670a) of the left encoding unit (660a), the (xe, ye) coordinates, which are information indicating the location of the upper-left sample (670b) of the middle encoding unit (660b), and the (xf, yf) coordinates, which are information indicating the location of the upper-left sample (670c) of the right encoding unit (660c). The image decoding device (100) can determine the size of each of the encoding units (660a, 660b, 660c) using the (xd, yd), (xe, ye), and (xf, yf) coordinates, which are information indicating the location of the encoding units (660a, 660b, 660c).
[0119] According to one embodiment, the image decoding device (100) may determine the width of the left encoding unit (660a) as xe-xd. The image decoding device (100) may determine the height of the left encoding unit (660a) as the height of the current encoding unit (650). According to one embodiment, the image decoding device (100) may determine the width of the middle encoding unit (660b) as xf-xe. The image decoding device (100) may determine the height of the middle encoding unit (660b) as the height of the current encoding unit (600). According to one embodiment, the image decoding device (100) may determine the width or height of the right encoding unit (660c) using the width or height of the current encoding unit (650) and the width and height of the left encoding unit (660a) and the middle encoding unit (660b). The image decoding device (100) can determine a encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (660a, 660b, 660c). Referring to FIG. 6, the image decoding device (100) can determine a middle encoding unit (660b) having a different size from the left encoding unit (660a) and the right encoding unit (660c) as the encoding unit of a predetermined position. However, since the process of the image decoding device (100) described above determining a encoding unit having a different size from other encoding units is merely one embodiment of determining the encoding unit of a predetermined position using the size of the encoding unit determined based on sample coordinates, various processes of determining the encoding unit of a predetermined position by comparing the size of the encoding unit determined according to the predetermined sample coordinates may be used.
[0120] However, the sample location considered to determine the location of the encoding unit should not be interpreted as being limited to the upper left corner described above, and can be interpreted as allowing the use of information regarding the location of any sample included in the encoding unit.
[0121] According to one embodiment, the image decoding device (100) may select an encoding unit at a predetermined position among an odd number of encoding units determined by dividing the current encoding unit, taking into account the shape of the current encoding unit. For example, if the current encoding unit is a non-square shape where the width is longer than the height, the image decoding device (100) may determine an encoding unit at a predetermined position according to the horizontal direction. That is, the image decoding device (100) may determine one of the encoding units at different positions in the horizontal direction and place a restriction on that encoding unit. If the current encoding unit is a non-square shape where the height is longer than the width, the image decoding device (100) may determine an encoding unit at a predetermined position according to the vertical direction. That is, the image decoding device (100) may determine one of the encoding units at different positions in the vertical direction and place a restriction on that encoding unit.
[0122] According to one embodiment, the image decoding device (100) may use information indicating the location of each of the even number of encoding units to determine the encoding unit at a predetermined location among the even number of encoding units. The image decoding device (100) may determine the even number of encoding units by dividing (binary division) the current encoding unit and may determine the encoding unit at a predetermined location using information regarding the locations of the even number of encoding units. Since the specific process for this may correspond to the process of determining the encoding unit at a predetermined location (e.g., the middle location) among the odd number of encoding units described above in FIG. 6, it is omitted.
[0123] According to one embodiment, when a current encoding unit in a non-square shape is divided into a plurality of encoding units, certain information regarding the encoding unit at a certain position may be used during the division process to determine the encoding unit at a certain position among the plurality of encoding units. For example, the image decoding device (100) may use at least one of block shape information and division shape mode information stored in a sample included in the middle encoding unit during the division process to determine the encoding unit located in the middle among the encoding units into which the current encoding unit is divided into a plurality of encoding units.
[0124] Referring to FIG. 6, the image decoding device (100) can divide the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c) based on the division form mode information, and can determine the encoding unit (620b) located in the middle among the plurality of encoding units (620a, 620b, 620c). Furthermore, the image decoding device (100) can determine the encoding unit (620b) located in the middle by considering the location where the division form mode information is obtained. That is, the segmentation mode information of the current encoding unit (600) can be obtained from a sample (640) located in the middle of the current encoding unit (600), and based on the segmentation mode information, if the current encoding unit (600) is divided into a plurality of encoding units (620a, 620b, 620c), the encoding unit (620b) containing the sample (640) can be determined as the encoding unit located in the middle. However, the information used to determine the encoding unit located in the middle should not be interpreted as being limited to segmentation mode information, and various types of information may be used in the process of determining the encoding unit located in the middle.
[0125] According to one embodiment, a predetermined information for identifying a coding unit at a predetermined location may be obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, an image decoding device (100) may use a segmentation mode information obtained from a sample at a predetermined location within the current coding unit (600) (for example, a sample at the center of the current coding unit (600)) to determine a coding unit at a predetermined location (for example, a coding unit located in the center of the multiple divided coding units) among a plurality of coding units (620a, 620b, 620c) determined by dividing the current coding unit (600). That is, the image decoding device (100) can determine a sample at the predetermined position by considering the block shape of the current encoding unit (600), and the image decoding device (100) can determine a encoding unit (620b) containing a sample from which certain information (e.g., division shape mode information) can be obtained among a plurality of encoding units (620a, 620b, 620c) from which the current encoding unit (600) is divided and determined, and can impose a certain limit. Referring to FIG. 6, according to one embodiment, the image decoding device (100) can determine a sample (640) located in the middle of the current encoding unit (600) as a sample from which certain information can be obtained, and the image decoding device (100) can impose a certain limit on the encoding unit (620b) containing such a sample (640) during the decoding process. However, the location of the sample from which the specified information can be obtained should not be interpreted as being limited to the location described above, but can be interpreted as samples at any location included in the encoding unit (620b) to be determined for the purpose of imposing a limitation.
[0126] According to one embodiment, the location of a sample from which a predetermined information can be obtained may be determined according to the shape of the current encoding unit (600). According to one embodiment, block shape information may determine whether the shape of the current encoding unit is square or non-square, and may determine the location of a sample from which a predetermined information can be obtained according to the shape. For example, the image decoding device (100) may determine a sample located on a boundary that divides at least one of the width and height of the current encoding unit in half using at least one of the information regarding the width and height of the current encoding unit as a sample from which a predetermined information can be obtained. As another example, if the block shape information related to the current encoding unit indicates that it is a non-square shape, the image decoding device (100) may determine one of the samples adjacent to the boundary that divides the long side of the current encoding unit in half as a sample from which a predetermined information can be obtained.
[0127] According to one embodiment, when the image decoding device (100) divides the current encoding unit into a plurality of encoding units, it may use division form mode information to determine the encoding unit at a predetermined position among the plurality of encoding units. According to one embodiment, the image decoding device (100) may obtain division form mode information from a sample at a predetermined position included in the encoding unit, and the image decoding device (100) may divide the plurality of encoding units generated by dividing the current encoding unit using the division form mode information obtained from a sample at a predetermined position included in each of the plurality of encoding units. That is, the encoding unit may be recursively divided using the division form mode information obtained from a sample at a predetermined position included in each of the encoding units. Since the recursive division process of the encoding unit has been described in detail through FIG. 5, a detailed explanation will be omitted.
[0128] According to one embodiment, the image decoding device (100) can determine at least one encoding unit by dividing the current encoding unit, and can determine the order in which the at least one encoding unit is decoded according to a predetermined block (e.g., the current encoding unit).
[0129] FIG. 7 illustrates the order in which a plurality of encoding units are processed when an image decoding device (100) divides a current encoding unit to determine a plurality of encoding units according to one embodiment.
[0130] According to one embodiment, the image decoding device (100) may determine a second encoding unit (710a, 710b) by dividing a first encoding unit (700) in a vertical direction according to the splitting form mode information, determine a second encoding unit (730a, 730b) by dividing the first encoding unit (700) in a horizontal direction, or determine a second encoding unit (750a, 750b, 750c, 750d) by dividing the first encoding unit (700) in both a vertical and a horizontal direction.
[0131] Referring to FIG. 7, the image decoding device (100) can determine the order of processing the determined second encoding units (710a, 710b) in the horizontal direction (710c) by dividing the first encoding unit (700) in the vertical direction. The image decoding device (100) can determine the processing order of the determined second encoding units (730a, 730b) in the vertical direction (730c) by dividing the first encoding unit (700) in the horizontal direction. The image decoding device (100) can determine the second encoding unit (750a, 750b, 750c, 750d) determined by dividing the first encoding unit (700) into vertical and horizontal directions, according to a predetermined order in which encoding units located in one row are processed and then encoding units located in the next row are processed (e.g., raster scan order or z scan order (750e), etc.).
[0132] According to one embodiment, the image decoding device (100) can recursively divide the encoding units. Referring to FIG. 7, the image decoding device (100) can divide the first encoding unit (700) to determine a plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d), and can recursively divide each of the determined plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d). A method of dividing multiple encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may be a method corresponding to a method of dividing the first encoding unit (700). Accordingly, the multiple encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may each be independently divided into multiple encoding units. Referring to FIG. 7, the image decoding device (100) may determine the second encoding units (710a, 710b) by dividing the first encoding unit (700) in a vertical direction, and furthermore, may determine whether to independently divide or not divide each of the second encoding units (710a, 710b).
[0133] According to one embodiment, the image decoding device (100) may divide the second encoding unit (710a) on the left side horizontally into third encoding units (720a, 720b), and may not divide the second encoding unit (710b) on the right side.
[0134] According to one embodiment, the processing order of the encoding units may be determined based on the process of dividing the encoding units. In other words, the processing order of the divided encoding units may be determined based on the processing order of the encoding units immediately before they are divided. The image decoding device (100) may determine the processing order of the third encoding units (720a, 720b), which are determined by dividing the second encoding unit (710a) on the left, independently of the second encoding unit (710b) on the right. Since the third encoding units (720a, 720b) are determined by dividing the second encoding unit (710a) on the left in a horizontal direction, the third encoding units (720a, 720b) may be processed in a vertical direction (720c). In addition, since the processing order of the second encoding unit (710a) on the left and the second encoding unit (710b) on the right corresponds to the horizontal direction (710c), the third encoding unit (720a, 720b) included in the second encoding unit (710a) on the left can be processed in the vertical direction (720c) before the right encoding unit (710b) is processed. The above description is intended to explain the process in which the processing order of the encoding units is determined according to the encoding unit before division, and therefore should not be interpreted as being limited to the above-described embodiment, but should be interpreted as being used in various ways in which encoding units determined by division in various forms can be processed independently according to a predetermined order.
[0135] FIG. 8 illustrates a process in which, according to one embodiment, an image decoding device (100) determines that the current encoding unit is divided into an odd number of encoding units when the encoding unit cannot be processed in a predetermined order.
[0136] According to one embodiment, the image decoding device (100) may determine that the current encoding unit is divided into an odd number of encoding units based on acquired segmentation mode information. Referring to FIG. 8, a square-shaped first encoding unit (800) may be divided into non-square-shaped second encoding units (810a, 810b), and the second encoding units (810a, 810b) may each be independently divided into third encoding units (820a, 820b, 820c, 820d, 820e). According to one embodiment, the image decoding device (100) can determine a plurality of third encoding units (820a, 820b) by dividing the left encoding unit (810a) among the second encoding units in a horizontal direction, and the right encoding unit (810b) can be divided into an odd number of third encoding units (820c, 820d, 820e).
[0137] According to one embodiment, the image decoding device (100) can determine whether there are an odd number of divided encoding units by determining whether the third encoding units (820a, 820b, 820c, 820d, 820e) can be processed in a predetermined order. Referring to FIG. 8, the image decoding device (100) can determine the third encoding units (820a, 820b, 820c, 820d, 820e) by recursively dividing the first encoding unit (800). The video decoding device (100) can determine whether the first encoding unit (800), the second encoding unit (810a, 810b), or the third encoding unit (820a, 820b, 820c, 820d, 820e) are divided into an odd number of encoding units based on at least one of block form information and division form mode information. For example, the encoding unit located on the right among the second encoding units (810a, 810b) may be divided into an odd number of third encoding units (820c, 820d, 820e). The order in which a plurality of encoding units included in the first encoding unit (800) are processed may be a predetermined order (e.g., z-scan order (830)), and the image decoding device (100) may determine whether the right second encoding unit (810b) is divided into an odd number of determined third encoding units (820c, 820d, 820e) can be processed according to the predetermined order.
[0138] According to one embodiment, the image decoding device (100) can determine whether the third encoding unit (820a, 820b, 820c, 820d, 820e) included in the first encoding unit (800) satisfies a condition that the third encoding unit (820a, 820b, 820c, 820d, 820e) can be processed in a predetermined order, and the condition relates to whether at least one of the width and height of the second encoding unit (810a, 810b) is divided in half according to the boundary of the third encoding unit (820a, 820b, 820c, 820d, 820e). For example, the third encoding unit (820a, 820b) determined by dividing the height of the left second encoding unit (810a) in a non-square shape in half can satisfy the condition. Since the boundaries of the third encoding units (820c, 820d, 820e), which are determined by dividing the right second encoding unit (810b) into three encoding units, do not divide the width or height of the right second encoding unit (810b) in half, the third encoding units (820c, 820d, 820e) may be determined not to satisfy the condition. In the case of such non-satisfaction of the condition, the image decoding device (100) determines that there is a disconnection in the scan order, and based on the result of the determination, the right second encoding unit (810b) may be determined to be divided into an odd number of encoding units. According to one embodiment, when the image decoding device (100) is divided into an odd number of encoding units, it may place a certain restriction on the encoding unit at a certain position among the divided encoding units, and since the details of such restriction or the certain position, etc., have been described in detail through various embodiments, a detailed explanation will be omitted.
[0139] FIG. 9 illustrates a process in which an image decoding device (100) divides a first encoding unit (900) to determine at least one encoding unit according to one embodiment.
[0140] According to one embodiment, the image decoding device (100) may divide the first encoding unit (900) based on the segmentation form mode information obtained through the bitstream acquisition unit (110). The first encoding unit (900) in a square shape may be divided into four square-shaped encoding units or into a plurality of non-square-shaped encoding units. For example, referring to FIG. 9, the first encoding unit (900) is square and the segmentation form mode information indicates that it is divided into non-square encoding units, so the image decoding device (100) may divide the first encoding unit (900) into a plurality of non-square encoding units. Specifically, when the splitting mode information indicates that the first encoding unit (900) is divided in a horizontal or vertical direction to determine an odd number of encoding units, the image decoding device (100) can divide the square-shaped first encoding unit (900) into an odd number of encoding units, such as a second encoding unit (910a, 910b, 910c) determined by dividing in a vertical direction or a second encoding unit (920a, 920b, 920c) determined by dividing in a horizontal direction.
[0141] According to one embodiment, the image decoding device (100) can determine whether the second encoding unit (910a, 910b, 910c, 920a, 920b, 920c) included in the first encoding unit (900) satisfies a condition that the second encoding unit (910a, 910b, 910c, 920a, 920b, 920c) can be processed in a predetermined order, and the condition relates to whether at least one of the width and height of the first encoding unit (900) is divided in half according to the boundary of the second encoding unit (910a, 910b, 910c, 920a, 920b, 920c). Referring to FIG. 9, the boundaries of the second encoding units (910a, 910b, 910c), which are determined by dividing the square-shaped first encoding unit (900) in the vertical direction, do not divide the width of the first encoding unit (900) in half, so the first encoding unit (900) may be determined not to satisfy the condition of being processed in a predetermined order. Additionally, the boundaries of the second encoding units (920a, 920b, 920c), which are determined by dividing the square-shaped first encoding unit (900) in the horizontal direction, do not divide the height of the first encoding unit (900) in half, so the first encoding unit (900) may be determined not to satisfy the condition of being processed in a predetermined order. The image decoding device (100) determines that if these conditions are not satisfied, there is a disconnection in the scan order, and based on the result of the determination, the first encoding unit (900) may be divided into an odd number of encoding units. According to one embodiment, when the image decoding device (100) is divided into an odd number of encoding units, it may place a certain restriction on the encoding unit at a certain position among the divided encoding units. Since the details of such restriction or the certain position have been described in detail through various embodiments, a detailed explanation will be omitted.
[0142] According to one embodiment, the image decoding device (100) can divide the first encoding unit to determine various forms of encoding units.
[0143] Referring to FIG. 9, the image decoding device (100) can divide a square-shaped first encoding unit (900) and a non-square-shaped first encoding unit (930 or 950) into various types of encoding units.
[0144] FIG. 10 illustrates that, according to one embodiment, when a video decoding device (100) divides a first encoding unit (1000) and a second encoding unit of a non-square shape determined by the division satisfies a predetermined condition, the shape in which the second encoding unit can be divided is limited.
[0145] According to one embodiment, the image decoding device (100) may decide to divide a square-shaped first encoding unit (1000) into non-square-shaped second encoding units (1010a, 1010b, 1020a, 1020b) based on division shape mode information obtained through a bitstream acquisition unit (110). The second encoding units (1010a, 1010b, 1020a, 1020b) may be divided independently. Accordingly, the image decoding device (100) may decide to divide into a plurality of encoding units or not divide based on division shape mode information related to each of the second encoding units (1010a, 1010b, 1020a, 1020b). According to one embodiment, the image decoding device (100) may determine a third encoding unit (1012a, 1012b) by dividing the left second encoding unit (1010a), which is a non-square shape determined by dividing the first encoding unit (1000) in the vertical direction, in the horizontal direction. However, when the image decoding device (100) divides the left second encoding unit (1010a) in the horizontal direction, the right second encoding unit (1010b) may be restricted so that it cannot be divided in the same horizontal direction as the left second encoding unit (1010a). If the right second encoding unit (1010b) is divided in the same direction to determine the third encoding unit (1014a, 1014b), the left second encoding unit (1010a) and the right second encoding unit (1010b) may be divided independently in the horizontal direction to determine the third encoding unit (1012a, 1012b, 1014a, 1014b). However, this is the same result as the image decoding device (100) dividing the first encoding unit (1000) into four square-shaped second encoding units (1030a, 1030b, 1030c, 1030d) based on the division shape mode information, and this may be inefficient in terms of image decoding.
[0146] According to one embodiment, the image decoding device (100) may determine a third encoding unit (1022a, 1022b, 1024a, 1024b) by dividing a first encoding unit (1000) in a horizontal direction and a second encoding unit (1020a or 1020b) in a non-square shape in a vertical direction. However, if the image decoding device (100) divides one of the second encoding units (e.g., the upper second encoding unit (1020a)) in a vertical direction, it may restrict the other second encoding unit (e.g., the lower encoding unit (1020b)) from being divided in the same vertical direction as the upper second encoding unit (1020a) in accordance with the above-described reason.
[0147] FIG. 11 illustrates the process of a video decoder (100) dividing square-shaped encoding units when, according to one embodiment, the divided shape mode information cannot be divided into four square-shaped encoding units.
[0148] According to one embodiment, the image decoding device (100) can determine the second encoding unit (1110a, 1110b, 1120a, 1120b, etc.) by dividing the first encoding unit (1100) based on the division shape mode information. The division shape mode information may include information on various shapes in which the encoding unit can be divided, but the information on various shapes may not include information for dividing into four square-shaped encoding units. According to this division shape mode information, the image decoding device (100) cannot divide the square-shaped first encoding unit (1100) into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d). Based on the segmented form mode information, the image decoding device (100) can determine a non-square second encoding unit (1110a, 1110b, 1120a, 1120b, etc.).
[0149] According to one embodiment, the image decoding device (100) can independently divide each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) in a non-square shape. Each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) can be divided in a predetermined order through a recursive method, and this may be a division method corresponding to the method in which the first encoding unit (1100) is divided based on division shape mode information.
[0150] For example, the image decoding device (100) can determine a square-shaped third encoding unit (1112a, 1112b) by dividing the left second encoding unit (1110a) in a horizontal direction, and can determine a square-shaped third encoding unit (1114a, 1114b) by dividing the right second encoding unit (1110b) in a horizontal direction. Furthermore, the image decoding device (100) can determine a square-shaped third encoding unit (1116a, 1116b, 1116c, 1116d) by dividing both the left second encoding unit (1110a) and the right second encoding unit (1110b) in a horizontal direction. In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).
[0151] As another example, the video decoding device (100) may determine a square-shaped third encoding unit (1122a, 1122b) by dividing the upper second encoding unit (1120a) in a vertical direction, and determine a square-shaped third encoding unit (1124a, 1124b) by dividing the lower second encoding unit (1120b) in a vertical direction. Furthermore, the video decoding device (100) may determine a square-shaped third encoding unit (1126a, 1126b, 1126a, 1126b) by dividing both the upper second encoding unit (1120a) and the lower second encoding unit (1120b) in a vertical direction. In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).
[0152] FIG. 12 illustrates that, according to one embodiment, the processing order between a plurality of encoding units may vary depending on the division process of the encoding unit.
[0153] According to one embodiment, the image decoding device (100) may divide the first encoding unit (1200) based on the division shape mode information. When the block shape is square and the division shape mode information indicates that the first encoding unit (1200) is divided in at least one of the horizontal direction and the vertical direction, the image decoding device (100) may divide the first encoding unit (1200) to determine the second encoding unit (e.g., 1210a, 1210b, 1220a, 1220b, etc.). Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) in a non-square shape determined by dividing the first encoding unit (1200) only in the horizontal direction or the vertical direction may be divided independently based on the division shape mode information for each. For example, the video decoding device (100) can determine the third encoding unit (1216a, 1216b, 1216c, 1216d) by dividing the second encoding unit (1210a, 1210b) generated by dividing the first encoding unit (1200) in the vertical direction, and can determine the third encoding unit (1226a, 1226b, 1226c, 1226d) by dividing the second encoding unit (1220a, 1220b) generated by dividing the first encoding unit (1200) in the horizontal direction, respectively, in the vertical direction. Since the process of dividing these second encoding units (1210a, 1210b, 1220a, 1220b) has been described in detail in relation to FIG. 11, a detailed explanation will be omitted.
[0154] According to one embodiment, the image decoding device (100) can process encoding units in a predetermined order. Since the characteristics of processing encoding units in a predetermined order have been described in detail in relation to FIG. 7, a detailed explanation will be omitted. Referring to FIG. 12, the image decoding device (100) can divide a square-shaped first encoding unit (1200) to determine four square-shaped third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d). According to one embodiment, the image decoding device (100) can determine the processing order of the third encoding unit (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) according to the form in which the first encoding unit (1200) is divided.
[0155] According to one embodiment, the image decoding device (100) can determine the third encoding unit (1216a, 1216b, 1216c, 1216d) by dividing the second encoding unit (1210a, 1210b) generated by dividing in the vertical direction into the horizontal direction, and the image decoding device (100) can process the third encoding unit (1216a, 1216b, 1216c, 1216d) according to the order (1217) of first processing the third encoding unit (1216a, 1216c) included in the left second encoding unit (1210a) in the vertical direction, and then processing the third encoding unit (1216b, 1216d) included in the right second encoding unit (1210b) in the vertical direction.
[0156] According to one embodiment, the image decoding device (100) can determine the third encoding unit (1226a, 1226b, 1226c, 1226d) by dividing the second encoding unit (1220a, 1220b) generated by dividing in the horizontal direction into the vertical direction, and the image decoding device (100) can process the third encoding unit (1226a, 1226b, 1226c, 1226d) according to the order (1227) of first processing the third encoding unit (1226a, 1226b) included in the upper second encoding unit (1220a) in the horizontal direction, and then processing the third encoding unit (1226c, 1226d) included in the lower second encoding unit (1220b) in the horizontal direction.
[0157] Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) are each divided to determine the square-shaped third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d). The second encoding unit (1210a, 1210b) determined by dividing in the vertical direction and the second encoding unit (1220a, 1220b) determined by dividing in the horizontal direction are divided into different forms, but according to the third encoding unit (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) determined thereafter, the result is that the first encoding unit (1200) is divided into encoding units of the same form. Accordingly, the image decoding device (100) recursively divides the encoding unit through different processes based on the division form mode information, so that even if the encoding units of the same form are determined as a result, the multiple encoding units determined in the same form can be processed in different orders.
[0158] FIG. 13 illustrates a process in which, according to one embodiment, a encoding unit is recursively divided to determine a plurality of encoding units, and the depth of the encoding unit is determined as the shape and size of the encoding unit change.
[0159] According to one embodiment, the image decoding device (100) may determine the depth of the encoding unit according to a predetermined standard. For example, the predetermined standard may be the length of the long side of the encoding unit. The image decoding device (100) may determine that if the length of the long side of the current encoding unit is divided by 2n (n>0) times the length of the long side of the encoding unit before division, the depth of the current encoding unit is increased by n compared to the depth of the encoding unit before division. In the following, the encoding unit with increased depth is expressed as a lower depth encoding unit.
[0160] Referring to FIG. 13, according to one embodiment, based on block shape information indicating that it is a square shape (for example, the block shape information may indicate '0: SQUARE'), an image decoding device (100) can determine a second encoding unit (1302), a third encoding unit (1304), etc. of a lower depth by dividing a first encoding unit (1300) that is square in shape. If the size of the first encoding unit (1300) that is square in shape is 2Nx2N, the second encoding unit (1302), which is determined by dividing the width and height of the first encoding unit (1300) by half, may have a size of NxN. Furthermore, the third encoding unit (1304), which is determined by dividing the width and height of the second encoding unit (1302) by half, may have a size of N / 2xN / 2. In this case, the width and height of the third encoding unit (1304) correspond to 1 / 4 times the width and height of the first encoding unit (1300). When the depth of the first encoding unit (1300) is D, the depth of the second encoding unit (1302), which is 1 / 2 times the width and height of the first encoding unit (1300), may be D+1, and the depth of the third encoding unit (1304), which is 1 / 4 times the width and height of the first encoding unit (1300), may be D+2.
[0161] According to one embodiment, based on block shape information representing a non-square shape (for example, the block shape information may represent '1: NS_VER' indicating that the height is longer than the width, or '2: NS_HOR' indicating that the width is longer than the height), the image decoding device (100) may divide a first encoding unit (1310 or 1320) that is a non-square shape to determine a second encoding unit (1312 or 1322), a third encoding unit (1314 or 1324), etc. of a lower depth.
[0162] The image decoding device (100) can determine a second encoding unit (e.g., 1302, 1312, 1322, etc.) by dividing at least one of the width and height of a first encoding unit (1310) of size Nx2N. That is, the image decoding device (100) can determine a second encoding unit (1302) of size NxN or a second encoding unit (1322) of size NxN / 2 by dividing the first encoding unit (1310) in a horizontal direction, and can also determine a second encoding unit (1312) of size N / 2xN by dividing it in a horizontal direction and a vertical direction.
[0163] According to one embodiment, the image decoding device (100) may determine a second encoding unit (e.g., 1302, 1312, 1322, etc.) by dividing at least one of the width and height of a first encoding unit (1320) of size 2NxN. That is, the image decoding device (100) may determine a second encoding unit (1302) of size NxN or a second encoding unit (1312) of size N / 2xN by dividing the first encoding unit (1320) in the vertical direction, and may determine a second encoding unit (1322) of size NxN / 2 by dividing it in the horizontal and vertical directions.
[0164] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by dividing at least one of the width and height of a second encoding unit (1302) of size NxN. That is, the image decoding device (100) may determine a third encoding unit (1304) of size N / 2xN / 2 by dividing the second encoding unit (1302) in a vertical direction and a horizontal direction, or determine a third encoding unit (1314) of size N / 4xN / 2, or determine a third encoding unit (1324) of size N / 2xN / 4.
[0165] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by dividing at least one of the width and height of a second encoding unit (1312) of size N / 2xN. That is, the image decoding device (100) may determine a third encoding unit (1304) of size N / 2xN / 2 or a third encoding unit (1324) of size N / 2xN / 4 by dividing the second encoding unit (1312) in a horizontal direction, or determine a third encoding unit (1314) of size N / 4xN / 2 by dividing it in a vertical direction and a horizontal direction.
[0166] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by dividing at least one of the width and height of a second encoding unit (1322) of size NxN / 2. That is, the image decoding device (100) may determine a third encoding unit (1304) of size N / 2xN / 2 or a third encoding unit (1314) of size N / 4xN / 2 by dividing the second encoding unit (1322) in the vertical direction, or determine a third encoding unit (1324) of size N / 2xN / 4 by dividing it in the vertical and horizontal directions.
[0167] According to one embodiment, the image decoding device (100) may divide square-shaped encoding units (e.g., 1300, 1302, 1304) in a horizontal or vertical direction. For example, a first encoding unit (1300) of size 2Nx2N may be divided in a vertical direction to determine a first encoding unit (1310) of size Nx2N, or divided in a horizontal direction to determine a first encoding unit (1320) of size 2NxN. According to one embodiment, when the depth is determined based on the length of the longest side of the encoding unit, the depth of the encoding unit determined by dividing the first encoding unit (1300) of size 2Nx2N in a horizontal or vertical direction may be the same as the depth of the first encoding unit (1300).
[0168] According to one embodiment, the width and height of the third encoding unit (1314 or 1324) may correspond to 1 / 4 times the width and height of the first encoding unit (1310 or 1320). If the depth of the first encoding unit (1310 or 1320) is D, the depth of the second encoding unit (1312 or 1322), which is 1 / 2 times the width and height of the first encoding unit (1310 or 1320), may be D+1, and the depth of the third encoding unit (1314 or 1324), which is 1 / 4 times the width and height of the first encoding unit (1310 or 1320), may be D+2.
[0169] FIG. 14 illustrates a depth and part index (hereinafter PID) for distinguishing between coding units that can be determined according to the shape and size of the coding units according to one embodiment.
[0170] According to one embodiment, the image decoding device (100) can determine various shapes of second encoding units by dividing a square-shaped first encoding unit (1400). Referring to FIG. 14, the image decoding device (100) can determine second encoding units (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) by dividing the first encoding unit (1400) in at least one of a vertical direction and a horizontal direction according to the division shape mode information. That is, the image decoding device (100) can determine the second encoding unit (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) based on the segmented form mode information for the first encoding unit (1400).
[0171] According to one embodiment, the depth of the second encoding unit (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d), which is determined according to the segmented shape mode information for the first encoding unit (1400) in a square shape, can be determined based on the length of the longer side. For example, since the length of one side of the first encoding unit (1400) in a square shape and the length of the longer side of the second encoding unit (1402a, 1402b, 1404a, 1404b) in a non-square shape are the same, the depth of the first encoding unit (1400) and the second encoding unit (1402a, 1402b, 1404a, 1404b) in a non-square shape can be considered to be the same as D. In contrast, when the video decoding device (100) divides the first encoding unit (1400) into four square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) based on the division shape mode information, since the length of one side of the square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) is half the length of one side of the first encoding unit (1400), the depth of the second encoding units (1406a, 1406b, 1406c, 1406d) may be a depth of D+1, which is one depth lower than the depth D of the first encoding unit (1400).
[0172] According to one embodiment, the image decoding device (100) may divide a first encoding unit (1410), in which the height is longer than the width, into a plurality of second encoding units (1412a, 1412b, 1414a, 1414b, 1414c) by dividing it in a horizontal direction according to the division shape mode information. According to one embodiment, the image decoding device (100) may divide a first encoding unit (1420), in which the width is longer than the height, into a plurality of second encoding units (1422a, 1422b, 1424a, 1424b, 1424c) by dividing it in a vertical direction according to the division shape mode information.
[0173] According to one embodiment, a second encoding unit (1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, 1424c) determined according to the segmented shape mode information for a first encoding unit (1410 or 1420) of a non-square shape may have its depth determined based on the length of the longer side. For example, since the length of one side of the square-shaped second encoding unit (1412a, 1412b) is half the length of one side of the non-square-shaped first encoding unit (1410) in which the height is longer than the width, the depth of the square-shaped second encoding unit (1412a, 1412b) is D+1, which is one depth lower than the depth D of the non-square-shaped first encoding unit (1410).
[0174] Furthermore, the image decoding device (100) may divide a first encoding unit (1410) in a non-square shape into an odd number of second encoding units (1414a, 1414b, 1414c) based on the division shape mode information. The odd number of second encoding units (1414a, 1414b, 1414c) may include a second encoding unit (1414a, 1414c) in a non-square shape and a second encoding unit (1414b) in a square shape. In this case, since the length of the longer side of the non-square second encoding unit (1414a, 1414c) and the length of one side of the square second encoding unit (1414b) are half the length of one side of the first encoding unit (1410), the depth of the second encoding unit (1414a, 1414b, 1414c) may be a depth of D+1, which is one depth lower than the depth D of the first encoding unit (1410). The image decoding device (100) may determine the depth of the encoding units associated with the non-square first encoding unit (1420), in a manner corresponding to the above method of determining the depth of the encoding units associated with the first encoding unit (1410).
[0175] According to one embodiment, when determining an index (PID) for distinguishing divided encoding units, the video decoding device (100) may determine the index based on the size ratio between the encoding units when the odd number of divided encoding units are not of the same size. Referring to FIG. 14, the encoding unit (1414b) located in the middle among the odd number of divided encoding units (1414a, 1414b, 1414c) may have the same width as the other encoding units (1414a, 1414c) but may have twice the height of the other encoding units (1414a, 1414c). That is, in this case, the encoding unit (1414b) located in the middle may include two of the other encoding units (1414a, 1414c). Accordingly, if the index (PID) of the encoding unit (1414b) located in the middle according to the scan order is 1, the encoding unit (1414c) located in the next order may have an index of 3, which is an increase of 2. That is, there may be a discontinuity in the index values. According to one embodiment, the image decoding device (100) may determine whether the encoding units divided into an odd number are not of the same size based on whether there is a discontinuity in the index for distinguishing between these divided encoding units.
[0176] According to one embodiment, the image decoding device (100) may determine whether a plurality of encoding units determined by dividing from the current encoding unit are divided into a specific division form based on the value of an index for distinguishing the plurality of encoding units. Referring to FIG. 14, the image decoding device (100) may divide a first encoding unit (1410) in the shape of a rectangle whose height is greater than its width to determine an even number of encoding units (1412a, 1412b) or an odd number of encoding units (1414a, 1414b, 1414c). The image decoding device (100) may use an index (PID) representing each encoding unit to distinguish each of the plurality of encoding units. According to one embodiment, the PID may be obtained from a sample at a predetermined position of each encoding unit (e.g., the upper left sample).
[0177] According to one embodiment, the image decoding device (100) can determine a coding unit at a predetermined position among the coding units determined by division using an index for distinguishing the coding units. According to one embodiment, if the division shape mode information for a first coding unit (1410) in the form of a rectangle whose height is longer than its width indicates that it is divided into three coding units, the image decoding device (100) can divide the first coding unit (1410) into three coding units (1414a, 1414b, 1414c). The image decoding device (100) can assign an index to each of the three coding units (1414a, 1414b, 1414c). The image decoding device (100) can compare the indices for each coding unit to determine the middle coding unit among the odd number of divided coding units. The image decoding device (100) may determine a encoding unit (1414b) having an index corresponding to the middle value among the indices based on the indices of the encoding units, as the encoding unit at the middle position among the encoding units determined by dividing the first encoding unit (1410). According to one embodiment, when determining an index for distinguishing the divided encoding units, the image decoding device (100) may determine the index based on the size ratio between the encoding units if the encoding units are not of the same size. Referring to FIG. 14, the encoding unit (1414b) generated by dividing the first encoding unit (1410) may have the same width as the other encoding units (1414a, 1414c) but may have a height twice that of the other encoding units (1414a, 1414c). In this case, if the index (PID) of the encoding unit (1414b) located in the middle is 1, the encoding unit (1414c) located in the next order may have an index of 3, which is increased by 2.In cases where the index increases uniformly but the rate of increase changes, such as in this case, the image decoding device (100) may determine that the current encoding unit is divided into a plurality of encoding units, including encoding units having different sizes from other encoding units. In one embodiment, if the division type mode information indicates that the current encoding unit is divided into an odd number of encoding units, the image decoding device (100) may divide the current encoding unit in such a way that the encoding unit at a predetermined position among the odd number of encoding units (e.g., the middle encoding unit) has a different size from other encoding units. In this case, the image decoding device (100) may determine the middle encoding unit having a different size by using an index (PID) for the encoding unit. However, the aforementioned index, the size or position of the encoding unit at a predetermined position to be determined, is specific for the purpose of explaining one embodiment and should not be interpreted as being limited thereto, and should be interpreted as allowing various indices, positions, and sizes of encoding units to be used.
[0178] According to one embodiment, the image decoding device (100) may use a predetermined data unit in which recursive division of the encoding unit begins.
[0179] FIG. 15 illustrates that a plurality of encoding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment.
[0180] According to one embodiment, a predetermined data unit may be defined as a data unit in which the encoding unit begins to recursively divide using the division form mode information. That is, it may correspond to the highest depth encoding unit used in the process of determining multiple encoding units that divide the current picture. For convenience of explanation, such a predetermined data unit will be referred to as a reference data unit below.
[0181] According to one embodiment, the reference data unit may have a predetermined size and shape. According to one embodiment, the reference data unit may include MxN samples. Here, M and N may be the same 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 subsequently be divided into an integer number of encoding units.
[0182] According to one embodiment, the image decoding device (100) can divide the current picture into a plurality of reference data units. According to one embodiment, the image decoding device (100) can divide the current picture into a plurality of reference data units using division form mode information for each reference data unit. This division process of reference data units may correspond to a division process using a quad-tree structure.
[0183] According to one embodiment, the image decoding device (100) can predetermine the minimum size that a reference data unit included in the current picture may have. Accordingly, the image decoding device (100) can determine reference data units of various sizes having a size greater than or equal to the minimum size, and can determine at least one encoding unit using segmentation form mode information based on the determined reference data unit.
[0184] Referring to FIG. 15, the image decoding device (100) may use a square-shaped reference encoding unit (1500) or a non-square-shaped reference encoding unit (1502). According to one embodiment, the shape and size of the reference encoding unit may be determined according to various data units (e.g., sequence, picture, slice, slice segment, tile, tile group, maximum encoding unit, etc.) that may include at least one reference encoding unit.
[0185] According to one embodiment, the bitstream acquisition unit (110) of the image decoding device (100) can acquire at least one of information regarding the shape of the reference encoding unit and information regarding the size of the reference encoding unit from the bitstream for each of the various data units. The process of determining at least one encoding unit included in the square-shaped reference encoding unit (1500) has been described in detail through the process of dividing the current encoding unit (300) of FIG. 3, and the process of determining at least one encoding unit included in the non-square-shaped reference encoding unit (1502) has been described in detail through the process of dividing the current encoding unit (400 or 450) of FIG. 4, so a detailed explanation is omitted.
[0186] According to one embodiment, the image decoding device (100) may use an index to identify the size and shape of a reference encoding unit in order to determine the size and shape of a reference encoding unit according to a portion of data units that are predetermined based on a predetermined condition. That is, the bitstream acquisition unit (110) may acquire only an index for identifying the size and shape of a reference encoding unit for each slice, slice segment, tile, tile group, maximum encoding unit, etc., among the various data units (e.g., sequence, picture, slice, slice segment, tile, tile group, maximum encoding unit, etc.) from the bitstream, as a data unit that satisfies a predetermined condition (e.g., a data unit having a size smaller than or equal to a slice). By using the index, the image decoding device (100) can determine the size and shape of a reference data unit for each data unit that satisfies the predetermined condition. When information regarding the form of the reference encoding unit and information regarding the size of the reference encoding unit are obtained from the bitstream for each data unit of a relatively small size and used, the utilization efficiency of the bitstream may be poor; therefore, instead of directly obtaining information regarding the form of the reference encoding unit and information regarding the size of the reference encoding unit, only the index may be obtained and used. In this case, at least one of the size and form of the reference encoding unit corresponding to the index representing the size and form of the reference encoding unit may be predetermined. That is, the image decoding device (100) can determine at least one of the size and form of the reference encoding unit included in the data unit that serves as the basis for obtaining the index by selecting at least one of the predetermined size and form of the reference encoding unit according to the index.
[0187] According to one embodiment, the image decoding device (100) may utilize at least one reference encoding unit included in one maximum encoding unit (1510). That is, the maximum encoding unit that divides the image may include at least one reference encoding unit, and the encoding unit may be determined through a recursive division process of each reference encoding unit. According to one embodiment, at least one of the width and height of the maximum encoding unit may correspond to an integer multiple of at least one of the width and height of the reference encoding unit. According to one embodiment, the size of the reference encoding unit may be the size obtained by dividing the maximum encoding unit n times according to a quad tree structure. That is, the image decoding device (100) may determine the reference encoding unit by dividing the maximum encoding unit n times according to a quad tree structure, and according to various embodiments, the reference encoding unit may be divided based on at least one of block form information and division form mode information.
[0188] According to one embodiment, the image decoding device (100) may obtain and use block form information indicating the form of the current encoding unit or division form mode information indicating a method of dividing the current encoding unit from a bitstream. The division form mode information may be included in bitstreams associated with various data units. For example, the image decoding device (100) may use division form mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, and a tile group header. Furthermore, the image decoding device (100) may obtain and use syntax elements corresponding to the block form information or division form mode information from the bitstream for each maximum encoding unit and reference encoding unit.
[0189] A method for determining a division rule according to one embodiment of the present disclosure will be described in detail below.
[0190] The image decoding device (100) can determine the segmentation rule of the image. The segmentation rule may be predetermined between the image decoding device (100) and the image encoding device (200). The image decoding device (100) can determine the segmentation rule of the image based on information obtained from a bitstream. The image decoding device (100) can 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 segment header, a tile header, and a tile group header. The image decoding device (100) can determine the segmentation rule differently depending on the frame, slice, tile, temporal layer, maximum encoding unit, or encoding unit.
[0191] The image decoding device (100) can determine a partitioning rule based on the block shape of the encoding unit. The block shape may include the size, shape, ratio of width and height, and orientation of the encoding unit. The image encoding device (200) and the image decoding device (100) may predetermine to determine a partitioning rule based on the block shape of the encoding unit. However, they are not limited thereto. The image decoding device (100) can determine a partitioning rule based on information obtained from a bitstream received from the image encoding device (200).
[0192] The shape of the encoding unit may include square and non-square. If the width and height of the encoding unit are the same, the image decoder (100) may determine the shape of the encoding unit as square. Additionally, if the width and height of the encoding unit are not the same, the image decoder (100) may determine the shape of the encoding unit as non-square.
[0193] The size of the encoding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256. The size of the encoding unit may be classified according to the length of the long side, the length of the short side, or the width of the encoding unit. The image decoding device (100) may apply the same partitioning rule to encoding units classified into the same group. For example, the image decoding device (100) may classify encoding units having the same long side length into the same size. Additionally, the image decoding device (100) may apply the same partitioning rule to encoding units having the same long side length.
[0194] The ratio of width to height of a encoding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, or 1:32, etc. Additionally, the direction of the encoding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the width of the encoding unit is longer than the height. The vertical direction may indicate a case where the width of the encoding unit is shorter than the height.
[0195] The image decoder (100) can adaptively determine a splitting rule based on the size of the encoding unit. The image decoder (100) can determine different acceptable splitting mode types based on the size of the encoding unit. For example, the image decoder (100) can determine whether splitting is allowed based on the size of the encoding unit. The image decoder (100) can determine the splitting direction according to the size of the encoding unit. The image decoder (100) can determine an acceptable splitting type according to the size of the encoding unit.
[0196] Determining the division rule based on the size of the encoding unit may be a division rule predetermined between the image encoding device (200) and the image decoding device (100). Additionally, the image decoding device (100) may determine the division rule based on information obtained from the bitstream.
[0197] The image decoder (100) can adaptively determine a partitioning rule based on the position of the encoding unit. The image decoder (100) can adaptively determine a partitioning rule based on the position occupied by the encoding unit in the image.
[0198] Additionally, the video decoding device (100) can determine a splitting rule so that encoding units generated by different splitting paths do not have the same block shape. However, this is not limited thereto, and encoding units generated by different splitting paths may have the same block shape. Encoding units generated by different splitting paths may have different decoding processing orders. Since the decoding processing order has been explained together with FIG. 12, a detailed explanation is omitted.
[0199] FIG. 16 illustrates the encoding units that can be determined for each picture when the combination of forms in which the encoding units can be divided according to one embodiment is different for each picture.
[0200] Referring to FIG. 16, the image decoding device (100) may determine different combinations of division forms in which the encoding unit can be divided for each picture. For example, the image decoding device (100) may decode an image using a picture (1600) that can be divided into four encoding units, a picture (1610) that can be divided into two or four encoding units, and a picture (1620) that can be divided into two, three, or four encoding units among at least one picture included in the image. To divide the picture (1600) into multiple encoding units, the image decoding device (100) may use only division form information indicating that it is divided into four square encoding units. To divide the picture (1610), the image decoding device (100) may use only division form information indicating that it is divided into two or four encoding units. The image decoding device (100) may use only division form information indicating that the picture (1620) is divided into two, three, or four encoding units in order to divide the picture. Since the combination of division forms described above is merely an example for explaining the operation of the image decoding device (100), the combination of division forms described above should not be interpreted as being limited to the above example, but should be interpreted as allowing various combinations of division forms to be used for each predetermined data unit.
[0201] According to one embodiment, a bitstream acquisition unit (110) of an image decoding device (100) may acquire a bitstream containing an index representing a combination of division form information for each predetermined data unit (e.g., sequence, picture, slice, slice segment, tile, or tile group, etc.). For example, the bitstream acquisition unit (110) may acquire an index representing a combination of division form information from a sequence parameter set, a picture parameter set, a slice header, a tile header, or a tile group header. The image decoding device (100) may determine a combination of division forms in which the encoding unit can be divided for each predetermined data unit using the acquired index, and accordingly, different combinations of division forms may be used for each predetermined data unit.
[0202] FIG. 17 illustrates various forms of encoding units that can be determined based on partitioned form mode information that can be expressed as binary code according to one embodiment.
[0203] According to one embodiment, the image decoding device (100) can divide the encoding unit into various forms using block form information and division form mode information obtained through the bitstream acquisition unit (110). The forms of the encoding unit that can be divided may correspond to various forms including the forms described through the embodiments above.
[0204] Referring to FIG. 17, the image decoding device (100) can divide a square-shaped encoding unit into at least one of a horizontal direction and a vertical direction based on the divided shape mode information, and can divide a non-square-shaped encoding unit into a horizontal direction or a vertical direction.
[0205] According to one embodiment, if the image decoding device (100) can divide a square-shaped encoding unit into four square encoding units by dividing it in the horizontal and vertical directions, there may be four types of division forms that can be represented by the division form mode information for the square encoding unit. According to one embodiment, the division form mode information may be expressed as a 2-digit binary code, and a binary code may be assigned to each division form. For example, if the encoding unit is not divided, the division form mode information may be expressed as (00)b; if the encoding unit is divided in the horizontal and vertical directions, the division form mode information may be expressed as (01)b; if the encoding unit is divided in the horizontal direction, the division form mode information may be expressed as (10)b; and if the encoding unit is divided in the vertical direction, the division form mode information may be expressed as (11)b.
[0206] According to one embodiment, when the image decoding device (100) divides a non-square-shaped encoding unit in a horizontal or vertical direction, the type of division form that can be represented by the division form mode information may be determined by how many encoding units are divided. Referring to FIG. 17, according to one embodiment, the image decoding device (100) may divide a non-square-shaped encoding unit into up to three. The image decoding device (100) may divide the encoding unit into two encoding units, in which case the division form mode information may be expressed as (10)b. The image decoding device (100) may divide the encoding unit into three encoding units, in which case the division form mode information may be expressed as (11)b. The image decoding device (100) may decide not to divide the encoding unit, in which case the division form mode information may be expressed as (0)b. That is, the video decoding device (100) can use variable length coding (VLC) rather than fixed length coding (FLC) to use binary code representing segmented form mode information.
[0207] Referring to FIG. 17 according to one embodiment, the binary code of the division type mode information indicating that the encoding unit is not divided can be represented as (0)b. If the binary code of the division type mode information indicating that the encoding unit is not divided is set to (00)b, then all 2 bits of the binary code of the division type mode information must be used even though there is no division type mode information set to (01)b. However, as illustrated in FIG. 17, if three division types for a non-square encoding unit are used, the image decoding device (100) can determine that the encoding unit is not divided even if a 1-bit binary code (0)b is used as the division type mode information, thus allowing for efficient use of the bitstream. However, the division type of the non-square encoding unit indicated by the division type mode information should not be interpreted as being limited only to the three types illustrated in FIG. 17, but should be interpreted as various types including the embodiments described above.
[0208] FIG. 18 illustrates another form of encoding unit that can be determined based on partitioned form mode information that can be represented as binary code according to one embodiment.
[0209] Referring to FIG. 18, the image decoding device (100) can divide a square-shaped encoding unit in a horizontal or vertical direction based on the division shape mode information, and can divide a non-square-shaped encoding unit in a horizontal or vertical direction. That is, the division shape mode information can indicate that a square-shaped encoding unit is divided in one direction. In this case, the binary code of the division shape mode information indicating that the square-shaped encoding unit is not divided can be represented as (0)b. If the binary code of the division shape mode information indicating that the encoding unit is not divided is set to (00)b, then all 2 bits of the binary code of the division shape mode information must be used even though there is no division shape mode information set to (01)b. However, as illustrated in FIG. 18, if three division forms for a square-shaped encoding unit are used, the image decoding device (100) can determine that the encoding unit is not divided even if a 1-bit binary code (0)b is used as division form mode information, thus allowing the bitstream to be used efficiently. However, the division form of the square-shaped encoding unit indicated by the division form mode information should not be interpreted as being limited only to the three forms illustrated in FIG. 18, but should be interpreted as various forms including the embodiments described above.
[0210] According to one embodiment, block form information or partition form mode information can be represented using binary code, and such information can be immediately generated as a bitstream. Additionally, block form information or partition form mode information that can be represented by binary code may not be immediately generated as a bitstream but may be used as binary code input in CABAC (context adaptive binary arithmetic coding).
[0211] According to one embodiment, the image decoding device (100) describes a process of obtaining syntax for block form information or partition form mode information through CABAC. A bitstream containing a binary code for the syntax can be obtained through a bitstream acquisition unit (110). The image decoding device (100) can detect a syntax element representing block form information or partition form mode information by debinding a bin string included in the obtained bitstream. According to one embodiment, the image decoding device (100) obtains a set of binary bin strings corresponding to the syntax element to be decoded, and can decode each bin using probability information, and the image decoding device (100) can repeat this process until the bin string composed of these decoded bins becomes equal to one of the previously obtained bin strings. The image decoding device (100) can determine the syntax element by performing debinding of the bin string.
[0212] According to one embodiment, the image decoding device (100) can determine the syntax for a bin string by performing a decoding process of adaptive binary arithmetic coding, and the image decoding device (100) can update a probability model for the bins obtained through a bitstream acquisition unit (110). Referring to FIG. 17, the bitstream acquisition unit (110) of the image decoding device (100) can obtain a bitstream representing a binary code representing partitioned mode information according to one embodiment. Using the obtained binary code having a size of 1 bit or 2 bits, the image decoding device (100) can determine the syntax for the partitioned mode information. To determine the syntax for the partitioned mode information, the image decoding device (100) can update the probability for each bit of the 2-bit binary code. That is, the image decoding device (100) can update the probability of having a value of 0 or 1 when decoding the next bin, depending on whether the value of the first bin of the 2-bit binary code is 0 or 1.
[0213] According to one embodiment, the image decoding device (100) can update the probability for the bins used in the process of decoding the bins of the empty string for the syntax during the process of determining the syntax, and the image decoding device (100) can determine that the probability is not updated for certain bits of the empty string and has the same probability.
[0214] Referring to FIG. 17, in the process of determining syntax using an empty string representing segmentation mode information for a non-square type encoding unit, the image decoder (100) can determine syntax for the segmentation mode information using one bin having a value of 0 when the non-square type encoding unit is not segmented. That is, when block type information indicates that the current encoding unit is a non-square type, the first bin of the empty string for the segmentation mode information may be 0 when the non-square type encoding unit is not segmented, and 1 when it is segmented into two or three encoding units. Accordingly, the probability that the first bin of the empty string for the segmentation mode information for a non-square type encoding unit is 0 may be 1 / 3, and the probability that it is 1 may be 2 / 3. As described above, since the image decoding device (100) can represent only a 1-bit empty string having a value of 0 as the segmentation mode information indicating that a non-square type encoding unit is not segmented, the image decoding device (100) can determine the syntax for the segmentation mode information by determining whether the second bin is 0 or 1 only when the first bin of the segmentation mode information is 1. According to one embodiment, the image decoding device (100) can decode the bin by considering that when the first bin of the segmentation mode information is 1, the probability that the second bin is 0 or 1 is equal to the probability.
[0215] According to one embodiment, the image decoding device (100) may use various probabilities for each bin in the process of determining the bins of the bin string for the segmented form mode information. According to one embodiment, the image decoding device (100) may determine the probability of the bins for the segmented form mode information differently depending on the direction of the non-square block. According to one embodiment, the image decoding device (100) may determine the probability of the bins for the segmented form mode information differently depending on the width or the length of the long side of the current encoding unit. According to one embodiment, the image decoding device (100) may determine the probability of the bins for the segmented form mode information differently depending on at least one of the shape of the current encoding unit and the length of the long side.
[0216] According to one embodiment, the image decoding device (100) may determine that the probability of bins for segmented form mode information is the same for encoding units of a predetermined size or larger. For example, based on the length of the long side of the encoding unit, the probability of bins for segmented form mode information is determined to be the same for encoding units of a size of 64 samples or larger.
[0217] According to one embodiment, the image decoding device (100) may determine the initial probability for the bins constituting the empty string of the segmented form mode information based on the slice type (e.g., I slice, P slice, or B slice).
[0218] Figure 19 is a block diagram of an image encoding and decoding system that performs in-loop filtering.
[0219] The encoding unit (1910) of the video encoding and decoding system (1900) transmits an encoded bitstream of the video, and the decoding unit (1950) receives the bitstream and decodes it to output a restored video. Here, the encoding unit (1910) may have a configuration similar to the video encoding device (200) described later, and the decoding unit (1950) may have a configuration similar to the video decoding device (100).
[0220] In the encoding unit (1910), the prediction encoding unit (1915) outputs prediction data through inter-prediction and intra-prediction, and the transformation and quantization unit (1920) outputs quantized transformation coefficients of residual data between the prediction data and the current input image. The entropy encoding unit (1925) encodes and transforms the quantized transformation coefficients and outputs them as a bitstream. The quantized transformation coefficients are restored into spatial domain data through the inverse quantization and inverse transformation unit (1930), and the restored spatial domain data is output as a restored image through the in-loop filtering unit (1940). The restored image can be used as a reference image for the next input image after passing through the prediction encoding unit (1915).
[0221] The encoded image data among the bitstreams received by the decoding unit (1950) is restored into spatial domain residual data through the entropy decoding unit (1955) and the inverse quantization and inverse transform unit (1960). The predicted data and residual data output from the prediction decoding unit (1975) are combined to form spatial domain image data, and the in-loop filtering unit (1970) can output a restored image for the current original image by performing filtering on the spatial domain image data. The restored image can be used as a reference image for the next original image by the prediction decoding unit (1975).
[0222] The in-loop filtering unit (1940) of the encoding unit (1910) performs in-loop filtering using filter information input according to user input or system settings. The filter information used by the in-loop filtering unit (1940) is output to the entropy encoding unit (1925) and transmitted to the decoding unit (1950) along with the encoded image data. The in-loop filtering unit (1970) of the decoding unit (1950) can perform in-loop filtering based on the filter information input from the decoding unit (1950).
[0223] The various embodiments described above explain the operation related to the image decoding method performed by the image decoding device (100). Below, the operation of the image encoding device (200) that performs an image encoding method corresponding to the reverse process of the image decoding method will be explained through various embodiments.
[0224] FIG. 2 illustrates a block diagram of an image encoding device (200) capable of encoding an image based on at least one of block shape information and segmented shape mode information according to one embodiment.
[0225] The video encoding device (200) may include an encoding unit (220) and a bitstream generation unit (210). The encoding unit (220) may receive an input video and encode the input video. The encoding unit (220) may encode the input video to obtain at least one syntax element. The syntax element may include at least one of a skip flag, a prediction mode, a motion vector difference, a motion vector prediction method (or index), a transform quantized coefficient, a coded block pattern, a coded block flag, an intra prediction mode, a direct flag, a merge flag, a delta QP, a reference index, a prediction direction, and a transform index. The encoding unit (220) may determine a context model based on block shape information including at least one of the shape, direction, width, and height ratio or size of the encoding unit.
[0226] The bitstream generation unit (210) can generate a bitstream based on the encoded input image. For example, the bitstream generation unit (210) can generate a bitstream by entropy encoding syntax elements based on a context model. Additionally, the image encoding device (200) can transmit the bitstream to the image decoding device (100).
[0227] According to one embodiment, the encoding unit (220) of the image encoding device (200) can determine the shape of the encoding unit. For example, the encoding unit may be square or non-square in shape, and information indicating such shape may be included in block shape information.
[0228] According to one embodiment, the encoding unit (220) can determine how the encoding unit will be divided. The encoding unit (220) can determine the form of at least one encoding unit included in the encoding unit, and the bitstream generation unit (210) can generate a bitstream including division form mode information that includes information about the form of such encoding unit.
[0229] According to one embodiment, the encoding unit (220) may determine whether the encoding unit is divided or not. If the encoding unit (220) determines that only one encoding unit is included in the encoding unit or that the encoding unit is not divided, the bitstream generation unit (210) may generate a bitstream including division type mode information indicating that the encoding unit is not divided. Additionally, the encoding unit (220) may divide the encoding unit into a plurality of encoding units, and the bitstream generation unit (210) may generate a bitstream including division type mode information indicating that the encoding unit is divided into a plurality of encoding units.
[0230] According to one embodiment, information indicating how many encoding units to divide or in which direction to divide may be included in the division type mode information. For example, the division type mode information may indicate dividing in at least one of the vertical direction and the horizontal direction, or not dividing.
[0231] The video encoding device (200) determines information regarding the segmentation mode based on the segmentation mode of the encoding unit. The video encoding device (200) determines a context model based on at least one of the ratio or size of the shape, direction, width, and height of the encoding unit. Then, the video encoding device (200) generates information regarding the segmentation mode for segmenting the encoding unit based on the context model as a bitstream.
[0232] The video encoding device (200) may obtain an array for matching at least one of the ratio or size of the shape, direction, width, and height of an encoding unit with an index for the context model in order to determine the context model. The video encoding device (200) may obtain an index for the context model based on at least one of the ratio or size of the shape, direction, width, and height of an encoding unit in the array. The video encoding device (200) may determine the context model based on the index for the context model.
[0233] The video encoding device (200) may determine a context model based further on block shape information including at least one of the ratio or size of the shape, direction, width, and height of a surrounding encoding unit adjacent to the encoding unit, in order to determine the context model. Additionally, the surrounding encoding unit may include at least one of the encoding units located on the lower left, left, upper left, upper, upper right, right, or lower right side of the encoding unit.
[0234] Additionally, the video encoding device (200) can compare the width of an upper peripheral encoding unit with the width of an encoding unit in order to determine a context model. Additionally, the video encoding device (200) can compare the height of left and right peripheral encoding units with the height of an encoding unit. Additionally, the video encoding device (200) can determine a context model based on the comparison results.
[0235] The operation of the video encoding device (200) includes content similar to the operation of the video decoding device (100) described in FIGS. 3 to 19, so a detailed description is omitted.
[0236] FIG. 20 is a block diagram illustrating the configuration of an image decoding device according to one embodiment.
[0237] Referring to FIG. 20, the image decoding device (2000) may include a memory (2010) and a processor (2030).
[0238] In one embodiment of the present disclosure, the memory (2010) and the processor (2030) of the present disclosure may each be implemented as at least one memory and at least one processor. In one embodiment of the present disclosure, when instructions are stored in the memory (2010), the operation of the bitstream acquisition unit (110), the decoding unit (120) illustrated in FIG. 1, and the entropy decoding unit (1955) and the prediction decoding unit (1975) illustrated in FIG. 19 may be implemented according to instructions called by at least one process.
[0239] In one embodiment of the present disclosure, the image decoding device (2000) may include a storage medium that stores at least one of the bitstream acquisition unit (110) and decoding unit (120) shown in FIG. 1, and the entropy decoding unit (1955) and prediction decoding unit (1975) shown in FIG. 19. The storage medium may be included in a memory (2010) or may be a storage medium different from the memory (2010).
[0240] Additionally, the video decoding device (2000) may include a storage medium control unit that controls the data input and output of the storage medium. The storage medium control unit may be included in the processor (2030), or it may be a control unit different from the processor (2030).
[0241] In one embodiment of the present disclosure, the image decoding device (2000) can obtain a bitstream generated as a result of encoding an image.
[0242] In one embodiment of the present disclosure, the bitstream may include encoded data generated by encoding for the current block. The encoded data included in the bitstream may be used to restore the current block. The current block may be a maximum encoding unit, encoding unit, transform unit, or prediction unit divided from the current image to be decoded.
[0243] In one embodiment of the present disclosure, the image decoding device (2000) can determine the current block based on information associated with a block included in a bitstream corresponding to at least one level of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header, and / or information about a block partitioning mode.
[0244] In one embodiment of the present disclosure, the image decoding device (2000) can receive a bitstream from the image encoding device through a network.
[0245] In one embodiment of the present disclosure, the image decoding device (2000) can obtain a bitstream from a data storage medium including a magnetic medium such as a hard disk, a floppy disk and a magnetic tape, an optical recording medium such as a CD-ROM and a DVD, a magneto-optical medium such as a floptical disk, etc.
[0246] In one embodiment of the present disclosure, an image decoding device (2000) may obtain syntax elements for decoding an image from a bitstream. Values corresponding to the syntax elements may be included in the bitstream according to the hierarchical structure of the image.
[0247] In one embodiment of the present disclosure, an image decoding device (2000) can parse bits included in a bitstream to obtain bins of syntax elements. The parsing process may include at least one of entropy decoding and inverse binary conversion processes.
[0248] In one embodiment of the present disclosure, the bitstream may include information indicating the prediction mode of the current block within the current image. The prediction mode of the current block may include an intra mode, an inter mode, an intra block copy mode, and / or a palette mode. The intra mode is an operation that predicts a block based on spatial similarity, and is a mode that predicts or restores the current block based on spatial similarity within the current image, and the inter mode is a mode that predicts or restores the current block based on a reference image to reduce temporal redundancy between images.
[0249] In one embodiment of the present disclosure, the prediction information may include all information for restoring the current block through prediction. The prediction information may include all information for restoring the current block through intra prediction, inter prediction, prediction in intra block copy mode, or palette mode prediction, or information on which mode is used to predict the current block.
[0250] In one embodiment of the present disclosure, the prediction information may be included in a sequence parameter set, a picture parameter set, a slice header, or slice data of a bitstream.
[0251] In one embodiment of the present disclosure, the image decoding device (2000) may include, as prediction information, information on the method for determining the intra prediction mode, a flag or index indicating the intra prediction mode when intra prediction is performed for the current block.
[0252] In one embodiment of the present disclosure, the image decoding device (2000) may determine the intra prediction mode indicated by the information obtained from the bitstream among a plurality of intra prediction modes as the intra prediction mode of the current block, when the method for determining the intra prediction mode is a method that utilizes information obtained from the bitstream. For example, the information indicating the intra prediction mode of the current block may include a flag or an index indicating any one of the plurality of intra prediction modes.
[0253] In one embodiment of the present disclosure, if the method of determining the intra prediction mode is a method using a reference block or a template, the image decoding device (2000) can determine the intra prediction mode of the current block by using a block in the current image that was restored before the current block or a template of a block in the current image.
[0254] In one embodiment of the present disclosure, the image decoding device (2000) can obtain information about a reference picture list indicating which of a plurality of reference picture lists to use for the prediction of the current block when inter-prediction is performed for the current block from the bitstream.
[0255] In one embodiment of the present disclosure, when the image decoding device (2000) restores the current block based on the reference image, it may use one reference image (e.g., unidirectional prediction) or two reference images (e.g., bi-prediction). This can be determined through information regarding a reference picture list indicating which reference picture list among a plurality of reference picture lists to use for the prediction of the current block for the inter-prediction of the current block.
[0256] In one embodiment of the present disclosure, the image decoding device (2000) can determine one reference picture list used for inter-predicting of the current block based on information regarding a reference picture list indicating which of a plurality of reference picture lists is to be used for predicting the current block for inter-predicting of the current block. For example, the image decoding device (2000) can obtain information regarding an index indicating whether a first reference picture list (L0) is used, whether a second reference picture list (L1) is used, or whether a pair prediction (L0 and L1) is used for inter-predicting of the current block.
[0257] In one embodiment of the present disclosure, the bitstream may include a reference image index indicating one of the reference images included in a reference picture list. For example, when a unidirectional prediction is performed for the current block, the image decoding device (2000) may obtain a reference image index from the bitstream indicating which of at least one reference image included in the reference picture list to use. When a pairwise prediction is performed for the current block, the image decoding device (2000) may obtain a first reference image index indicating a reference image included in a first reference picture list for the current block and a second reference image index indicating a reference image included in a second reference picture list, respectively.
[0258] In one embodiment of the present disclosure, the bitstream may include information for determining a motion vector. For example, an image decoder (2000) may obtain from the bitstream an index indicating one of the candidates included in a candidate block list. For example, when unidirectional prediction is performed for the current block, the image decoder (2000) may obtain from the bitstream a first index indicating a first candidate reference block among at least one candidate block included in a first candidate block list. When paired prediction is performed for the current block, the image decoder (2000) may obtain from the bitstream a first index indicating a first candidate reference block among at least one candidate block included in a first candidate block list and a second index indicating a second candidate reference block among at least one candidate block included in a second candidate block list. Meanwhile, the first candidate block list and the second candidate block list may be the same or different.
[0259] In one embodiment of the present disclosure, the image decoding device (2000) may obtain an index (e.g., a first index or a second index) indicating one of the candidates included in a candidate block list, and determine the motion vector of the current block using the motion vector of the candidate block indicated by the index.
[0260] In one embodiment of the present disclosure, the image decoding device (2000) can obtain or determine the motion vector of the current block by using the motion vector of a previously decoded block or a block included in a previously decoded image that is spatially adjacent to the current block.
[0261] In one embodiment of the present disclosure, the image decoder (2000) may determine the motion vector of a candidate block as the motion vector of the current block. The image decoder (2000) may obtain or determine the motion vector of the current block by combining information on the motion vector difference obtained from the bitstream with the motion vector of the candidate block. The image decoder (2000) may determine a reference block within a reference image using the motion vector of the current block.
[0262] In one embodiment of the present disclosure, the bitstream may include information related to a geometric partitioning mode (GPM). For example, the bitstream may include at least one of information regarding whether to predict the current block according to the geometric partitioning mode, information regarding the partition shape of the geometric partitioning mode of the current block, information for predicting a first partitioned region partitioned according to the partition shape of the geometric partitioning mode of the current block, information for predicting a second partitioned region partitioned according to the partition shape of the geometric partitioning mode of the current block, and blending information for processing partition boundaries.
[0263] In one embodiment of the present disclosure, the bitstream may obtain a geometric partition mode index of the current block. For example, information regarding the partition shape of the geometric partition mode of the current block included in the bitstream may include an index indicating one of a plurality of candidate partition modes sorted based on a Template Matching Cost (hereinafter referred to as Template Cost for convenience of explanation). The geometric partition mode index may be an index indicating the geometric partition mode of the current block among the sorted plurality of candidate partition modes.
[0264] Meanwhile, the above-mentioned first and second divided regions may represent different regions divided according to the division shape of the geometric division mode of the current block. Additionally, for the prediction of at least one of the first and second divided regions, inter-prediction (unidirectional prediction or paired prediction) or intra-prediction may be performed. Furthermore, when inter-prediction is performed for the prediction of at least one of the first and second divided regions, a motion vector difference may be obtained from the bitstream.
[0265] Meanwhile, the prediction information of the current block is not limited to the examples disclosed above, and the prediction information may include all information for restoring the current block through prediction.
[0266] In one embodiment of the present disclosure, information related to the geometric partitioning mode may be included in the sequence parameter set, picture parameter set, slice header, or slice data of the bitstream.
[0267] In one embodiment of the present disclosure, the image decoding device (2000) can generate a prediction block of the current block by performing a prediction on the current block according to the prediction mode of the current block, and can restore the current block using the prediction block.
[0268] In one embodiment of the present disclosure, prediction information may be included in a sequence parameter set, a picture parameter set, a slice header, or slice data of a bitstream.
[0269] In one embodiment of the present disclosure, the image decoding device (2000) can restore the current block. For example, the image decoding device (2000) can generate a prediction block using at least one reference block, and restore or generate the current block using the prediction block and residual data.
[0270] Meanwhile, regarding the operation of performing a prediction using a geometric partitioning mode for the current block, it is explained through FIGS. 21 to 32, and specifically regarding the operation of performing a prediction using a geometric partitioning mode for the current block considering the template cost, it will be described later with reference to FIGS. 23 to 32.
[0271] By performing prediction using a geometric partitioning mode based on template cost rather than in standards such as HEVC (High Efficiency Video Coding) and VVC (Versatile video coding), the performance of the prediction can be improved and the decoding quality of the image can be improved.
[0272] Below, with reference to FIG. 21, the operation of predicting the current block using a geometric partitioning mode is described.
[0273] FIG. 21 is a diagram illustrating the prediction operation of the current block using a geometric division mode according to one embodiment.
[0274] Referring to FIG. 21, the image decoder (2000) can predict a current block (2105) within a current image (2100) using a geometric partitioning mode. The geometric partitioning mode may be a mode that divides the current block (2105) into a first partitioned area (2106) and a second partitioned area (2107) and predicts the first partitioned area (2106) and the second partitioned area (2107) independently. The image decoder (2000) can perform predictions for areas partitioned through complex boundaries in addition to vertical or horizontal partitioning through the geometric partitioning mode.
[0275] In one embodiment of the present disclosure, the image decoder (2000) may obtain information related to a geometric partitioning mode from a bitstream. For example, the image decoder (2000) may obtain information from the bitstream regarding whether to predict the current block (2105) according to a geometric partitioning mode (information regarding whether to perform a geometric partitioning mode on the current block). The image decoder (2000) may decide to perform a geometric partitioning mode on the current block (2105) for prediction of the current block (2105) based on the information regarding whether to perform a geometric partitioning mode obtained from the bitstream.
[0276] In one embodiment of the present disclosure, an image decoder (2000) may obtain information regarding the partition shape of a geometric partition mode from a bitstream. For example, the image decoder (2000) may obtain a geometric partition mode index or parameter of a current block (2105) indicating one of a plurality of candidate partition modes according to a geometric partition mode. The image decoder (2000) may determine the candidate partition mode indicated by the geometric partition mode index as a geometric partition mode for prediction of the current block (2105).
[0277] Meanwhile, regarding multiple candidate partition modes according to the partition shape of the geometric partition mode, they will be explained in detail through Fig. 22.
[0278] In one embodiment of the present disclosure, the image decoding device (2000) may obtain prediction information for predicting a first segmented area (2106) and a second segmented area (2107). For example, the image decoding device (2000) may obtain an index or parameter regarding whether inter-prediction (unidirectional prediction or paired prediction) is performed or intra-prediction is performed for each of the first segmented area (2106) and the second segmented area (2107), as prediction information for at least one of the first segmented area (2106) and the second segmented area (2107). If it is determined that at least one of the first segmented area (2106) and the second segmented area (2107) is subject to inter-prediction, the image decoding device (2000) may obtain motion information for the area where inter-prediction is performed. The image decoding device (2000) can obtain information about an intra prediction mode for the area where intra prediction is performed when it is determined that at least one of the first divided area (2106) and the second divided area (2107) is to be subjected to intra prediction.
[0279] Meanwhile, for convenience of explanation, with reference to FIG. 21, we will explain the case where inter-prediction is performed on both the first divided area (2106) and the second divided area (2107) as an example. However, the first divided area (2106) may have inter-prediction performed and the second divided area (2107) may have intra-prediction performed, and vice versa, and is not limited to the disclosed example.
[0280] In one embodiment of the present disclosure, the image decoding device (2000) can predict the current block (2105) by using motion information of candidate reference blocks included in a reference candidate list. For example, the image decoding device (2000) can determine the first reference block (2115) included in the first reference image (2110) by using the first motion information (2112) to predict the first segmented area (2106) of the current block (2105). The image decoding device (2000) can determine the second reference block (2125) included in the second reference image (2120) by using the second motion information (2122) to predict the second segmented area (2107) of the current block (2105).
[0281] In one embodiment of the present disclosure, the image decoding device (2000) may acquire a first merge index for acquiring a first reference block (2115) and a second merge index for acquiring a second reference block (2125) among the merge lists for geometric partitioning modes. The image decoding device (2000) may acquire or determine the first reference block (2115) as a reference block for predicting the current block (2105) by using the first merge index as first motion information (2112), and may acquire or determine the second reference block (2125) as a reference block for predicting the current block (2105) by using the second merge index as second motion information (2122).
[0282] Meanwhile, the merge list for the geometric partitioning mode may be determined by interleaving the first motion vector candidate list and the second motion vector candidate list, and is not limited to the disclosed examples.
[0283] In one embodiment of the present disclosure, the image decoding device (2000) can predict the first divided area (2106) of the current block (2105) by using the area (2116) corresponding to the first divided area (2106) of the current block (2105) among the areas included in the first reference block (2115). The image decoding device (2000) can predict the second divided area (2107) of the current block (2105) by using the area (2127) corresponding to the second divided area (2107) of the current block (2105) among the areas included in the second reference block (2125).
[0284] In one embodiment of the present disclosure, the image decoder (2000) may blend predicted sample values within a first partition area (2106) and predicted sample values within a second partition area (2107) in order to smoothly connect the partition boundaries. The image decoder (2000) may obtain information related to the blending of partition boundaries from a bitstream in a geometric partition mode. For example, the image decoder (2000) may obtain information related to the size of the blending area of the partition boundaries in a geometric partition mode. The image decoder (2000) may blend the partition boundaries between the first partition area (2106) and the second partition area (2107) based on the information related to the size of the blending area of the partition boundaries obtained from the bitstream. Meanwhile, the information related to blending may be a blending index.
[0285] In one embodiment of the present disclosure, the image decoding device (2000) may acquire or generate a block as a prediction block by blending the division boundary between the first division area (2106) and the second division area (2107).
[0286] FIG. 22 is a drawing for illustrating examples of a plurality of geometric division modes according to one embodiment.
[0287] In one embodiment of the present disclosure, the image decoding device (2000) can divide the current block into two regions according to a plurality of candidate partitioning modes (2200) according to a geometric partitioning mode and independently perform prediction for each region.
[0288] Referring to FIG. 22, the image decoding device (2000) can divide the current block according to one of a plurality of candidate partition modes (2200) according to a geometric partition mode. For example, the image decoding device (2000) can divide the current block according to a partition shape listed in FIG. 22. The image decoding device (2000) can obtain a geometric partition mode index or parameter of the current block indicating one of the partition shapes listed in FIG. 22.
[0289] Meanwhile, the plurality of candidate division modes (2200) according to the geometric division mode are not limited to the examples listed in FIG. 22 and may vary depending on the division angle and division position. Also, for convenience of explanation, the case where there are 64 candidate division modes (2200) was described as an example, but the number of candidate division modes (2200) is not limited to the disclosed example and may vary.
[0290] Meanwhile, the number to the right of each urban candidate partition mode is displayed to distinguish each candidate partition mode and does not correspond to the geometric partition mode index of the current block.
[0291] FIG. 23 is a diagram illustrating a template in template matching according to one embodiment.
[0292] Referring to FIG. 23, the templates (2310, 2320, 2330, 2340) of the current block (2300) may have multiple shapes. In one embodiment of the present disclosure, the shape of the template compared in the restored area may also be determined according to the template of the current block (2300). In one embodiment of the present disclosure, a template with a shape similar to the templates (2310, 2330) may be referred to as an L-shape.
[0293] In one embodiment of the present disclosure, the image decoding device (2000) may determine a template of the current block (2300) to include at least one of a first template located to the left of the current block, a second template located to the upper side of the current block, and a third template located to the upper left side of the current block. For example, the template (2310) may include a first template located to the left of the current block, a second template located to the upper side of the current block, and a third template located to the upper left side of the current block, and the template (2320) may include the first template and the second template excluding the third template. However, not limited thereto, the template may include a template located to the right of the current block (2300).
[0294] In one embodiment of the present disclosure, an image decoding device (2000) may perform template matching using a template (2330) that includes at least some of a right reference sample, an upper reference sample, and an upper-right reference sample. The image decoding device (2000) may determine the template based on the coding order (or coding direction) of the blocks. For example, if the block coding is performed from right to left, the image decoding device (2000) may calculate or determine the template cost of the current block (2300) using the template (2330).
[0295] Meanwhile, in one embodiment of the present disclosure, the template cost may be a value determined using one or more of SAD (Sum of Absolute Difference), SATD (Sum of Absolute Transformed Difference), SSE (Sum of Squared Error), MR-SAD (Mean Removed SAD), MR-SSE (Mean Removed SSE), and HoG (Histogram of Oriented Gradient).
[0296] In one embodiment of the present disclosure, the image decoding device (2000) can calculate or determine the template cost of the current block (2300) using a template (2340) that includes at least some of a right reference sample, an upper reference sample, a left reference sample, an upper-left reference sample, and an upper-right reference sample.
[0297] In one embodiment of the present disclosure, the image decoding device (2000) can calculate or determine the template cost of the current block (2300) using a template (2340) that includes a referenceable sample when the coding order (or coding direction) of the block changes.
[0298] In one embodiment of the present disclosure, the template of the current block (2300) may include one or more reference lines. The first template may include m reference lines (where m is an integer greater than or equal to 1) and the second template may include n reference lines (where n is an integer greater than or equal to 1).
[0299] In one embodiment of the present disclosure, the image decoding device (2000) may determine the unrecovered samples as virtual values when some samples of a template corresponding to a reference block are not recovered. For example, the image decoding device (2000) may determine the value of the unrecovered samples when some samples of a first template are not recovered, and determine the template including the determined samples.
[0300] FIG. 23 is a drawing for illustrating a template according to one embodiment of the present disclosure, but is not limited thereto and various forms of templates may be determined. In addition, although the image decoding device (2000) in the present disclosure is described as calculating a template cost using a template (2310) that includes a left reference sample, an upper reference sample, and an upper-left reference sample, it is not limited thereto and may calculate or determine a template cost using a template of various shapes as described in FIG. 23.
[0301] FIG. 24 is a diagram illustrating the operation of determining a geometric division mode using a template according to one embodiment.
[0302] In one embodiment of the present disclosure, the templates (2421, 2426) of the current block (2400) are described as being located on the left side of the current block (2400) and on the upper side of the current block (2400). Among the templates of the current block (2400), the template located on the left side of the current block (2400) may be referred to as the left template (2421), and among the templates of the current block (2400), the template located on the upper side of the current block (2400) may be referred to as the upper template (2426).
[0303] In one embodiment of the present disclosure, the image decoding device (2000) can predict the current block (2400) using a geometric division mode. The image decoding device (2000) can predict the current block (2400) by dividing it according to the division shape of the geometric division mode by a predetermined division line. For example, when the current block (2400) is divided into two regions according to a candidate division mode that is divided according to the division line (2410) among a plurality of candidate division modes, one region may be referred to as the first division region (2401) and the remaining region may be referred to as the second division region (2402).
[0304] In one embodiment of the present disclosure, an image decoder (2000) can perform a prediction for the current block (2400) according to a geometric partitioning mode based on a plurality of candidate partitioning modes and candidate reference blocks according to a geometric partitioning mode for the current block (2400). For example, the image decoder (2000) can align a plurality of candidate partitioning modes based on a template cost using a template of the current block (2400), templates of candidate reference blocks, and a plurality of candidate partitioning modes.
[0305] In one embodiment of the present disclosure, the image decoding device (2000) may sort a plurality of candidate reference blocks and / or a plurality of candidate partition modes based on a template cost. The image decoding device (2000) may determine, among the plurality of candidate partition modes sorted based on a template cost, the candidate partition mode indicated by the geometric partition mode index of the current block (2400) as the geometric partition mode of the current block (2400).
[0306] In one embodiment of the present disclosure, the image decoding device (2000) can divide the current block (2400) by a division line (2410) according to a plurality of candidate division modes, and can divide a plurality of candidate reference blocks by a division line (2410) according to a plurality of candidate division modes.
[0307] In one embodiment of the present disclosure, the image decoding device (2000) may divide the template of the current block (2400) into a first template division area (2421, 2427) and a second template division area (2428) according to a plurality of candidate division modes. The image decoding device (2000) may divide each of the templates of a plurality of candidate reference blocks according to a plurality of candidate division modes, and for calculating the template cost, samples of the region corresponding to the position of the first template division area (2421, 2427) among the templates of the first candidate reference block, and samples of the region corresponding to the position of the second template division area (2428) among the templates of the second candidate reference block may be used.
[0308] In one embodiment of the present disclosure, the image decoding device (2000) may determine the template cost of the template of the current block (2400) according to a predetermined candidate partitioning mode and the templates of any two candidate reference blocks among a plurality of candidate reference blocks according to the following mathematical formula 1.
[0309] [Mathematical Formula 1]
[0310]
[0311] In the above mathematical formula 1, represents the template cost, and represents the template of the current block (2400), and is the template of the first candidate reference block, represents a mask operation based on a geometric partitioning mode, and can represent a template of the second candidate reference block.
[0312] Upon reviewing the above mathematical formula 1, the template cost can be calculated or determined by performing a mask operation according to the geometric partitioning mode on the template of the first candidate reference block, performing a mask operation that is inverted from the mask applied to the template of the first candidate reference block on the template of the second candidate reference block, and performing a SAD operation with the template of the current block (2400). Meanwhile, the template cost may be determined by performing MR-SAD, MR-SSE, or HoG operations, not limited to SAD operations, and is not limited to the disclosed examples.
[0313] In one embodiment of the present disclosure, a mask operation according to a geometric partitioning mode applied to a template of a first candidate reference block ( ) is an element-wise multiplication operation corresponding to the first template partition region (2421, 2427), and is a mask operation (1-) that is inverted from the mask applied to the template of the first candidate reference block. ) may be an element-wise multiplication operation corresponding to the second template partition area (2428).
[0314] In one embodiment of the present disclosure, the image decoding device (2000) may determine any two of a plurality of candidate reference blocks as reference blocks for a geometric partitioning mode of the current block (2400) based on information obtained from a bitstream. For example, the image decoding device (2000) may obtain an index or information indicating a first candidate reference block and a second candidate reference block as the first reference block and the second reference block, respectively, for a geometric partitioning mode of the current block (2400).
[0315] In one embodiment of the present disclosure, the image decoding device (2000) may determine two candidate reference blocks among a plurality of candidate reference blocks as reference blocks by calculating a template cost for each of two candidate reference blocks and a plurality of candidate partition modes.
[0316] In one embodiment of the present disclosure, the image decoding device (2000) may divide each of any two candidate reference blocks among a plurality of candidate reference blocks according to a predetermined candidate division mode and calculate a template cost by comparing it with the difference between the first template division area (2421, 2427) and the second template division area (2428) within the template of the current block (2400). Meanwhile, among the plurality of candidate reference blocks, any two candidate reference blocks may be referred to as a candidate reference block combination.
[0317] For example, the image decoding device (2000) can calculate a first split template cost calculated by calculating the difference between the first template split region (2421, 2427) within the template of the current block (2400) and the template region within the first candidate reference block corresponding to the first template split region (2421, 2427), and a second split template cost calculated by calculating the difference between the second template split region (2428) within the template of the current block (2400) and the template region within the second candidate reference block corresponding to the second template split region (2428). The image decoding device (2000) can determine the template cost corresponding to the first candidate reference block, the second candidate reference block, and a predetermined candidate split mode as the sum of the first split template cost and the second split template cost. Meanwhile, the first candidate reference block and the second candidate reference block may be candidate reference blocks included in a plurality of candidate reference blocks.
[0318] In one embodiment of the present disclosure, the image decoding device (2000) may sort a plurality of candidate partition modes in ascending order based on a template cost in correspondence with a candidate reference block combination. The image decoding device (2000) may sort a plurality of candidate partition modes based on a template cost and determine, among the sorted plurality of candidate partition modes, the candidate partition mode indicated by the geometric partition mode index of the current block (2400) as the geometric partition mode for the current block (2400).
[0319] In one embodiment of the present disclosure, the image decoding device (2000) may sort a plurality of candidate reference block combinations and a plurality of candidate partition modes in ascending order based on a template cost. For the sorted plurality of candidate reference block combinations and a plurality of candidate partition modes, the image decoding device (2000) may determine the candidate reference block combination and candidate partition mode indicated by the geometric partition mode index of the current block (2400) as the geometric partition mode for the current block (2400).
[0320] FIG. 25 is a diagram illustrating the operation of determining a geometric division mode using a template according to one embodiment.
[0321] In one embodiment of the present disclosure, the image decoding device (2000) can divide a current block (2500) and a plurality of candidate reference blocks according to a plurality of candidate division modes. The image decoding device (2000) can divide templates corresponding to the templates (2521, 2526) of the current block (2500) and the plurality of candidate reference blocks according to a plurality of candidate division modes. A plurality of candidate division modes or division shapes may represent a mode for dividing blocks along a predetermined division line.
[0322] In one embodiment of the present disclosure, the image decoding device (2000) can obtain the same template cost for some of the candidate partition modes when the candidate reference block combination is the same.
[0323] In one embodiment of the present disclosure, the image decoding device (2000) may have a first template cost determined according to a first candidate splitting mode that splits a block according to a first splitting line (2510) among a plurality of candidate splitting modes, a second template cost determined according to a second candidate splitting mode that splits a block according to a second splitting line (2511), and a third template cost determined according to a third candidate splitting mode that splits a block according to a third splitting line (2512), all of which may be the same.
[0324] For example, referring to Fig. 22, the template costs of the candidate partition modes corresponding to 55, 56, and 57 are all the same, and the template costs of the candidate partition modes corresponding to 53 and 54 may all be the same.
[0325] In one embodiment of the present disclosure, an image decoding device (2000) may output the same template cost for some candidate partition modes in a geometric partition mode using a template cost when the candidate reference block combinations are identical. In this case, some candidate partition modes may be excluded from the search priority according to the geometric partition mode, or all of them may be considered in the search priority. This may occur more frequently as the number of multiple candidate partition modes according to the geometric partition mode increases. Accordingly, it is necessary to calculate the cost by considering a wider range of samples than the template of each block.
[0326] FIG. 26 is a diagram illustrating the operation of determining a geometric partitioning mode using an extended template according to one embodiment.
[0327] In one embodiment of the present disclosure, an image decoding device (2000) can predict a current block (2600) using a geometric partitioning mode. The image decoding device (2000) can sort a plurality of candidate partitioning modes based on a template cost using extension templates (2621, 2626) of the current block (2600) and extension templates of a plurality of candidate reference blocks. Among the sorted plurality of candidate partitioning modes, the image decoding device (2000) can determine the candidate partitioning mode indicated by the geometric partitioning mode index as the geometric partitioning mode of the current block (2600).
[0328] In one embodiment of the present disclosure, the image decoding device (2000) can align a plurality of candidate partition modes based on template costs using an extension template (2621, 2626) of the current block (2600) extended in a direction parallel to the template of the current block (2600) and extension templates of candidate reference blocks extended in a direction parallel to the template of the candidate reference blocks.
[0329] In one embodiment of the present disclosure, the extension template (2621, 2626) of the current block (2600) may be a template extended by an integer multiple of 2 or 3 or more in a direction parallel to the template of the current block (2600), and may be adaptively determined according to the shape of the current block (2600) and / or a plurality of candidate partition modes, not limited to the disclosed examples. For example, the extension template (2621, 2626) of the current block (2600) may be determined differently depending on whether the shape of the current block (2600) is a square or a non-square rectangle. Alternatively, the extension template (2621, 2626) of the current block (2600) may be adaptively determined according to a plurality of candidate partition modes such that the partition lines (2610) corresponding to the plurality of candidate partition modes all pass through the extension template (2621, 2626) of the current block (2600).
[0330] In one embodiment of the present disclosure, the extension templates of the candidate reference blocks may be templates extended by an integer multiple of 2 or 3 or more in a direction parallel to the template of the current block (2600), and may be adaptively determined according to the shape of the current block (2600) and / or a plurality of candidate partition modes, not limited to the disclosed examples. For example, the extension templates of the candidate reference blocks may be determined differently depending on whether the shape of the current block (2600) is a square or a non-square rectangle. Alternatively, the extension templates of the candidate reference blocks may be adaptively determined according to a plurality of candidate partition modes such that the partition lines (2610) corresponding to a plurality of pre-set candidate partition modes all pass through the extension templates (2621, 2626) of the current block (2600).
[0331] In one embodiment of the present disclosure, the image decoding device (2000) may sort a plurality of candidate reference blocks and / or a plurality of candidate partition modes based on the template cost for an extended template. The image decoding device (2000) may determine, among the plurality of candidate partition modes sorted based on the template cost for the extended templates (2621, 2626), the candidate partition mode indicated by the geometric partition mode index of the current block (2600) as the geometric partition mode of the current block (2600).
[0332] In one embodiment of the present disclosure, the image decoding device (2000) may divide the extension template (2621, 2626) of the current block (2600) into a first extension template division area (2622, 2627) and a second extension template division area (2623, 2628) according to a plurality of candidate division modes. The image decoding device (2000) may divide each of the extension templates of a plurality of candidate reference blocks according to a plurality of candidate division modes.
[0333] In one embodiment of the present disclosure, the image decoding device (2000) may determine template costs corresponding to each of a plurality of candidate partitioning modes. For example, the image decoding device (2000) may obtain a first extended template partitioning area (2622, 2627) and a second extended template partitioning area (2623, 2628) by partitioning the template of the current block (2600) according to a predetermined candidate partitioning mode. The image decoding device (2000) may determine a template cost corresponding to a predetermined candidate partitioning mode according to the difference between the first extended template partitioning area (2622, 2627) and the area corresponding to the first extended template partitioning area (2622, 2627) among the extended templates of the first candidate reference block, and the difference between the second extended template partitioning area (2623, 2628) and the area corresponding to the second extended template partitioning area (2623, 2628) among the extended templates of the second candidate reference block.
[0334] In one embodiment of the present disclosure, the image decoding device (2000) can determine the template cost of the extension template (2621, 2626) of the current block (2600) according to a predetermined candidate partitioning mode and the extension templates of any two candidate reference blocks among a plurality of candidate reference blocks according to the following mathematical formula 2.
[0335] [Mathematical Formula 2]
[0336]
[0337] In the above mathematical formula 2, represents the template cost, and represents the extension templates (2621, 2626) of the current block (2600), and is the extension template of the first candidate reference block, represents a mask operation based on a geometric partitioning mode, and can represent an extension template of the second candidate reference block.
[0338] Upon reviewing the above mathematical formula 2, a template cost can be calculated or determined by performing a mask operation according to the geometric partitioning mode on the extension template of the first candidate reference block, and performing a mask operation that is inverted from the mask applied to the extension template of the first candidate reference block on the extension template of the second candidate reference block, and performing a SAD operation with the extension template (2621, 2626) of the current block (2600). Meanwhile, the template cost may be determined by performing MR-SAD, MR-SSE, or HoG operations, not limited to SAD operations, and is not limited to the disclosed examples.
[0339] In one embodiment of the present disclosure, a mask operation according to a geometric partitioning mode applied to an extension template of a first candidate reference block ( ) is an element-wise multiplication operation corresponding to the first extended template partition region (2622, 2627), and is a mask operation (1-) that is inverted from the mask applied to the template of the first candidate reference block. ) may be an element-wise multiplication operation corresponding to the second template partition area.
[0340] In one embodiment of the present disclosure, the image decoding device (2000) may calculate or determine the template cost by additionally considering the size of the partitioned area divided according to a predetermined candidate partitioning mode. For example, the image decoding device (2000) may determine the template cost of the extension template (2621, 2626) of the current block (2600) according to a predetermined candidate partitioning mode and the extension templates of any two candidate reference blocks among a plurality of candidate reference blocks by additionally considering the size of the partitioned area according to the following Equation 3.
[0341] [Mathematical Formula 3]
[0342]
[0343] The above mathematical formula 3 is derived from mathematical formula 2, and ( ) was added. represents the ratio of the first divided area among the current block (2600), and ( ) may also represent the ratio of the second divided area among the current block (2600).
[0344] In one embodiment of the present disclosure, the image decoding device (2000) may determine any two of a plurality of candidate reference blocks as reference blocks for a geometric partitioning mode of the current block (2600) based on information obtained from a bitstream. For example, the image decoding device (2000) may obtain an index or information indicating a first candidate reference block and a second candidate reference block as the first reference block and the second reference block, respectively, for a geometric partitioning mode of the current block (2600).
[0345] In one embodiment of the present disclosure, the image decoding device (2000) can determine the geometric partition mode of the current block (2600) using a geometric partition mode index indicating a predetermined candidate reference block combination and / or a predetermined candidate partition mode by calculating a template cost for each of a predetermined candidate reference block combination and a predetermined candidate partition mode among a plurality of candidate reference blocks.
[0346] In one embodiment of the present disclosure, the image decoding device (2000) may calculate a first partitioning template cost calculated by calculating the difference between the first extension template partitioning area (2622, 2627) within the extension template (2621, 2626) of the current block (2600) and the extension template area within the first candidate reference block corresponding to the first extension template partitioning area (2622, 2627), and a second partitioning template cost calculated by calculating the difference between the second extension template partitioning area (2623, 2628) within the extension template (2621, 2626) of the current block (2600) and the extension template area within the second candidate reference block corresponding to the second extension template partitioning area. The image decoding device (2000) may determine the template cost corresponding to the first candidate reference block, the second candidate reference block, and a predetermined candidate partitioning mode as the sum of the first partitioning template cost and the second partitioning template cost. Meanwhile, the first candidate reference block and the second candidate reference block may be candidate reference blocks included in a plurality of candidate reference blocks.
[0347] In one embodiment of the present disclosure, the image decoding device (2000) may sort a plurality of candidate partition modes in ascending order based on a template cost calculated or determined according to an extended template, corresponding to a candidate reference block combination. The image decoding device (2000) may sort a plurality of candidate partition modes based on a template cost determined according to an extended template, and among the sorted plurality of candidate partition modes, determine a candidate partition mode indicated by the geometric partition mode index of the current block (2600) as a geometric partition mode for the current block (2600).
[0348] In one embodiment of the present disclosure, the image decoding device (2000) may sort a plurality of candidate reference block combinations and a plurality of candidate partition modes in ascending order based on a template cost calculated or determined according to an extension template. For the sorted plurality of candidate reference block combinations and a plurality of candidate partition modes, the image decoding device (2000) may determine the candidate reference block combination and candidate partition mode indicated by the geometric partition mode index of the current block (2600) as the geometric partition mode for the current block (2600).
[0349] FIG. 27 is a diagram illustrating the operation of determining a geometric partitioning mode using an extended template according to one embodiment.
[0350] In one embodiment of the present disclosure, the image decoding device (2000) can align a plurality of candidate partition modes based on a template cost using an extended template (2721, 2726) of the current block (2700) extended in a direction parallel to the template of the current block (2700) and extended templates of candidate reference blocks extended in a direction parallel to the templates of candidate reference blocks. The image decoding device (2000) can align a plurality of candidate reference blocks and / or a plurality of candidate partition modes based on a template cost for the extended template.
[0351] In this case, it may require more memory and computation than sorting based on template cost using simple templates rather than extended templates.
[0352] In one embodiment of the present disclosure, the image decoding device (2000) may calculate a plurality of template costs corresponding to a plurality of candidate partition modes by sampling samples included in each of the extension templates (2721, 2726) of the current block (2700) and the extension templates of the candidate reference blocks. When the image decoding device (2000) aligns the template costs based on a plurality of candidate partition modes using the extension templates (2721, 2726) of the current block (2700) and the extension templates of the candidate reference blocks, it may determine a plurality of template costs by downsampling the extension templates (2721, 2726) of the current block (2700) and the extension templates of the candidate reference blocks. For example, the image decoding device (2000) may determine a plurality of template costs by downsampling the extension templates (2721, 2726) of the current block (2700) and the extension templates of the candidate reference blocks in the direction in which the templates are extended.
[0353] In one embodiment of the present disclosure, when the extension templates (2721, 2726) of the current block (2700) and the extension templates of the candidate reference blocks are extended by a factor of 2 in a direction parallel to the templates, the image decoding device (2000) may calculate or determine a plurality of template costs corresponding to a plurality of candidate partition modes by downsampling the extension templates (2721, 2726) of the current block (2700) and the extension templates of the candidate reference blocks by a factor of 2 in a direction parallel to the extension templates.
[0354] In one embodiment of the present disclosure, downsampling may be performed using methods such as 1:N average value downsampling, maximum value downsampling, and median value downsampling, but is not limited to the disclosed examples; interpolation methods such as nearest-neighbor interpolation, bilinear interpolation, bicubic interpolation, and spline interpolation may also be used.
[0355] In one embodiment of the present disclosure, the image decoder (2000) can determine a plurality of template costs by using the downsampled extended template (2731, 2736) of the current block (2700) and the downsampled extended templates of the candidate reference blocks. For example, the image decoder (2000) can sort a plurality of candidate partition modes by calculating or determining template costs corresponding to each of the plurality of candidate partition modes by using the downsampled extended template (2731, 2736) of the current block (2700) and the downsampled extended templates of the candidate reference blocks.
[0356] In one embodiment of the present disclosure, the amount of computation and the size of the data used can be reduced by using only the samples included in the areas (2732, 2737) within the downsampled extended template (2731, 2736) corresponding to the first template divided area (2722, 2727) and the areas (2733, 2738) within the downsampled extended template (2731, 2736) corresponding to the second template divided area (2723, 2728), without directly using all samples included in the template divided areas (2721, 2726) of the current block (2700) to calculate the template cost.
[0357] FIG. 28 is a diagram illustrating the operation of determining a geometric partitioning mode using an extended template according to one embodiment.
[0358] In one embodiment of the present disclosure, the image decoding device (2000) may calculate or determine a plurality of template costs corresponding to each of the plurality of candidate partition modes by additionally using samples including regions included in the current block (2800) derived or determined using extension templates (2810, 2815) of the current block (2800).
[0359] For example, the image decoding device (2000) can calculate a plurality of template costs corresponding to each of the plurality of candidate partition modes by using the first sample values of the first samples (2840, 2845) corresponding to the region containing samples included in the current block (2800) adjacent to the extension template (2810, 2815) within the current block (2800) derived using the extension template (2810, 2815) of the current block (2800) according to Equation 4, and the second sample values of the second samples corresponding to the region containing samples included in the candidate reference blocks adjacent to the extension template of the candidate reference blocks.
[0360] [Mathematical Formula 4]
[0361]
[0362] The above mathematical formula 4 is derived from mathematical formula 2, , , and was added. It may represent sample values of first samples (2840, 2845) corresponding to an area containing samples included in the current block (2800) that is adjacent to the extension template (2810, 2815) within the current block (2800) and derived using the extension template (2810, 2815) of the current block (2800). , and ... may be second sample values corresponding to an area containing samples included in the first candidate reference block that is adjacent to the extension template of the first candidate reference block, and an area containing samples included in the second candidate reference block that is adjacent to the extension template of the second candidate reference block. Meanwhile, for the sake of convenience of explanation, , and All of them are referred to as the second sample values.
[0363] In one embodiment of the present disclosure, , and These may be already predicted or restored sample values, but These may be temporarily predicted values to calculate the template cost. The image decoder (2000) may obtain or determine first sample values by using sample values of the extended template (2810, 2815) of the current block (2800).
[0364] In one embodiment of the present disclosure, an image decoding device (2000) can obtain or determine first sample values corresponding to first samples (2840, 2845) by using first current template samples (2830, 2835) extended in an area adjacent to the current block (2800) among samples included in the extended template (2810, 2815) of the current block (2800), and second current template samples (2820, 2825) adjacent to the first current template samples (2830, 2835) among samples included in the extended template (2810, 2815) of the current block (2800).
[0365] For example, the image decoding device (2000) has first sample values corresponding to the first samples (2840, 2845), Based on the assumption, It can be determined according to the formula.
[0366] In one embodiment of the present disclosure, the image decoding device (2000) can obtain a first linear parameter and a second linear parameter through linear regression analysis of first current template sample values corresponding to first current template samples (2830, 2835) and second current template sample values corresponding to second current template samples (2820, 2825).
[0367] For example, the video decoding device (2000) The first linear parameter satisfying and the second linear parameter The image decoding device (2000) can obtain the first sample values using linear regression analysis and the first linear parameter, the second linear parameter, and the first current template sample values. According to the formula, first sample values can be obtained or determined.
[0368] In one embodiment of the present disclosure, the image decoding device (2000) can perform a template cost calculation including a mask operation of Equation 4. The image decoding device (2000) calculates, through the mask operation of Equation 4, the difference between samples (2811, 2816, 2821, 2826, 2831, 2836, 2841, 2846) included in the first extended template partition area of the current block (2800) and samples included in the extended template area of the first candidate reference block that are positionally corresponding to the samples (2811, 2816, 2821, 2826, 2831, 2836, 2841, 2846) included in the first extended template partition area, and the difference between samples (2812, 2817, 2822, 2827, 2832, 2837, 2842, 2847) included in the second extended template partition area of the current block (2800) and the second extended template partition The template cost can be calculated by using the difference between the samples included in the region within the extension template of the second candidate reference block that corresponds positionally to the samples included in the region (2812, 2817, 2822, 2827, 2832, 2837, 2842, 2847).
[0369] Meanwhile, for the sake of convenience of explanation, the extended template (2810, 2815) of the current block (2800) may include the first current template samples (2830, 2835) and the second current template samples (2820, 2825), but the samples included in the first extended template partition area (2811, 2816, 2821, 2826, 2831, 2836, 2841, 2846) and the samples included in the second extended template partition area (2812, 2817, 2822, 2827, 2832, 2837, 2842, 2847) may be expressed without mutual inclusion.
[0370] FIG. 29 is a diagram illustrating the operation of determining a geometric partitioning mode using an extended template according to one embodiment.
[0371] In one embodiment of the present disclosure, the image decoding device (2000) can calculate or determine a plurality of template costs corresponding to each of the plurality of candidate partition modes by additionally using sample values corresponding to the region included in the current block (2900) derived or determined using the extension template (2910, 2915) of the current block (2900) and sample values corresponding to the region included in the candidate reference block (2950) and the extension template (2960, 2965) of the candidate reference block (2950).
[0372] For example, the image decoding device (2000) can calculate a plurality of template costs corresponding to each of the plurality of candidate partition modes by using first sample values corresponding to an area containing samples included in the current block (2900) adjacent to the extension template (2910, 2915) within the current block (2900) derived using the extension template (2910, 2915) of the current block (2900) according to Equation 4 included in the detailed description corresponding to FIG. 28, and second sample values of second samples (2990, 2995) corresponding to an area containing samples included in the candidate reference blocks adjacent to the extension template (2960, 2965) of the candidate reference block (2950).
[0373] In one embodiment of the present disclosure, an image decoding device uses at least one of first current template samples (2930, 2935) extended in an area adjacent to the current block (2900) among samples included in the extended templates (2910, 2915) of the current block (2900), first reference template samples (2980, 2985) extended in an area adjacent to the candidate reference blocks among samples included in the extended templates of candidate reference blocks, and second current template samples (2920, 2925) adjacent to the first current template samples (2930, 2935) among samples included in the extended templates (2910, 2915) of the current block (2900), and second reference template samples (2970, 2975) adjacent to the first reference template samples (2980, 2985) among samples included in the extended templates of candidate reference blocks, to form first samples (2940, First sample values corresponding to 2945) can be obtained or determined.
[0374] For example, the image decoding device (2000) has first sample values corresponding to the first samples, The assumption or Based on the assumption, Determine according to the formula, or It can be determined according to.
[0375] In one embodiment of the present disclosure, the image decoding device (2000) can obtain a first linear parameter and a second linear parameter through linear regression analysis on at least two of the first current template sample values corresponding to the first current template samples (2930, 2935), the second current template sample values corresponding to the second current template samples (2920, 2925), the first reference template sample values corresponding to the first reference template samples (2980, 2985), and the second reference template sample values corresponding to the second reference template samples (2970, 2975).
[0376] In one embodiment of the present disclosure, the image decoding device (2000) is The first linear parameter satisfying and the second linear parameter The image decoding device (2000) can obtain the first sample values using linear regression analysis and the first linear parameter, the second linear parameter, and the second sample values. According to the formula, first sample values can be obtained or determined.
[0377] In one embodiment of the present disclosure, the image decoding device (2000) is The first linear parameter satisfying and the second linear parameter The image decoding device (2000) can obtain the first sample values using linear regression analysis and the first linear parameter, the second linear parameter, and the second sample values. According to the formula, first sample values can be obtained or determined.
[0378] In one embodiment of the present disclosure, the image decoding device (2000) is The first linear parameter satisfying ). and the second linear parameter The image decoding device (2000) can obtain the first sample values using linear regression analysis and the first linear parameter, the second linear parameter, and the second sample values. According to the formula, first sample values can be obtained or determined.
[0379] In one embodiment of the present disclosure, the image decoding device (2000) can perform a template cost calculation including a mask operation of Equation 4. The image decoding device, through the mask operation of Equation 4, determines the difference between samples (2911, 2916, 2921, 2926, 2931, 2936, 2941, 2946) included in the first extended template partition area among the extended templates (2910, 2915) of the current block (2900) and samples (2961, 2966, 2971, 2976, 2981, 2986, 2991, 2946) included in the extended template area of the first candidate reference block that corresponds positionally to the samples (2911, 2916, 2921, 2926, 2931, 2936, 2941, 2946) included in the extended template area of the first candidate reference block, and the difference between the samples (2961, 2966, 2971, 2976, 2981, 2986, 2991, 2996) included in the extended template area of the first candidate reference block that corresponds positionally to the samples (2911, 2916, 2921, 2926, 2931, 2936, 2941, 2946) included in the extended template of the current block (2900), The template cost can be calculated by using the difference between the samples (2912, 2917, 2922, 2927, 2932, 2937, 2942, 2947) included in the second extended template partition area among the samples (2915) and the samples (2962, 2967, 2972, 2977, 2982, 2987, 2992, 2997) included in the extended template area of the second candidate reference block that corresponds positionally to the samples (2912, 2917, 2922, 2927, 2932, 2937, 2942, 2947) included in the second extended template partition area.
[0380] Meanwhile, for the sake of convenience of explanation, the candidate reference block (2950) of FIG. 29 is depicted as a single candidate reference block, but the samples (2961, 2966, 2971, 2976, 2981, 2986, 2991, 2996) included in the area within the extended template of the first candidate reference block that corresponds positionally to the first extended template partition area may represent a part of the extended template of the first candidate reference block. The samples (2962, 2967, 2972, 2977, 2982, 2987, 2992, 2997) included in the area within the extended template of the second candidate reference block that corresponds positionally to the second extended template partition area may represent a part of the extended template of the second candidate reference block.
[0381] Meanwhile, for the sake of convenience of explanation, the extended template (2910, 2915) of the current block (2900) may include the first current template samples (2930, 2935) and the second current template samples (2920, 2925), but the samples included in the first extended template partition area (2911, 2916, 2921, 2926, 2931, 2936, 2941, 2946) and the samples included in the second extended template partition area (2912, 2917, 2922, 2927, 2932, 2937, 2942, 2947) may be expressed without mutual inclusion.
[0382] Meanwhile, for the sake of convenience of explanation, the extended template (2960, 2965) of the candidate reference block (2950) may include the first reference template samples (2980, 2985) and the second reference template samples (2970, 2975), but the samples (2961, 2966, 2971, 2976, 2981, 2986, 2991, 2996) included in the area within the extended template of the first candidate reference block that corresponds positionally to the first extended template partition area, and the samples (2962, 2967, 2972, 2977, 2982, 2987, 2992, 2997) included in the area within the extended template of the second candidate reference block that corresponds positionally to the second extended template partition area may be expressed without mutual inclusion.
[0383] FIG. 30 is a flowchart of an image decoding method according to one embodiment.
[0384] In step S3010, the image decoder (2000) can obtain the geometric partition mode index of the current block from the bitstream.
[0385] In one embodiment of the present disclosure, the image decoding device (2000) may obtain a geometric partition mode index from a bitstream that indicates a candidate partition mode used for predicting the current block among a plurality of candidate partition modes. For example, the geometric partition mode index may be an index that indicates the geometric partition mode of the current block among a plurality of aligned candidate partition modes.
[0386] Meanwhile, regarding the geometric partitioning mode index of the current block, redundant details are omitted as they have been explained in the preceding disclosure.
[0387] In step S3020, the image decoding device (2000) can align a plurality of candidate partition modes based on template costs by using an extension template of the current block extended in a direction parallel to the template of the current block and extension templates of candidate reference blocks extended in a direction parallel to the templates of candidate reference blocks.
[0388] In one embodiment of the present disclosure, the image decoding device (2000) can arrange a plurality of candidate partition modes based on template costs using the extension template of the current block and the extension templates of the candidate reference block.
[0389] In one embodiment of the present disclosure, the extension template of the current block may be a template extended by an integer multiple of 2 or 3 or more in a direction parallel to the template of the current block, and may be adaptively determined according to the shape of the current block and / or a plurality of candidate partition modes, not limited to the disclosed examples. For example, the extension template of the current block may be determined differently depending on whether the shape of the current block is a square or a non-square rectangle. Alternatively, the extension template of the current block may be adaptively determined according to a plurality of candidate partition modes such that all partition lines corresponding to a plurality of pre-set candidate partition modes pass through the extension template of the current block.
[0390] In one embodiment of the present disclosure, the extension templates of candidate reference blocks may be templates extended by an integer multiple of 2 or 3 or more in a direction parallel to the template of the current block, and may be adaptively determined according to the shape of the current block and / or a plurality of candidate partition modes, not limited to the disclosed examples. For example, the extension templates of candidate reference blocks may be determined differently depending on whether the shape of the current block is a square or a non-square rectangle. Alternatively, the extension templates of candidate reference blocks may be adaptively determined according to a plurality of candidate partition modes such that the partition lines corresponding to a plurality of pre-set candidate partition modes all pass through the extension template of the current block.
[0391] In one embodiment of the present disclosure, the image decoding device (2000) may determine template costs corresponding to a combination of candidate partitioning modes and / or each of a plurality of candidate partitioning modes. For example, the image decoding device (2000) may obtain a first extended template partitioning area and a second extended template partitioning area by partitioning the template of the current block according to a predetermined candidate partitioning mode. The image decoding device (2000) may determine a template cost corresponding to a predetermined candidate partitioning mode according to the difference between the first extended template partitioning area and the area corresponding to the first extended template partitioning area among the extended templates of the first candidate reference block, and the difference between the second extended template partitioning area and the area corresponding to the second extended template partitioning area among the extended templates of the second candidate reference block.
[0392] In one embodiment of the present disclosure, the image decoding device (2000) can determine the template cost of the extension template of the current block according to a predetermined candidate partitioning mode and the extension templates of any two candidate reference blocks among a plurality of candidate reference blocks. The image decoding device (2000) can calculate a first partitioning template cost calculated by calculating the difference between a first extension template partitioning area within the extension template of the current block and an area within the extension template of the first candidate reference block corresponding to the first extension template partitioning area, and a second partitioning template cost calculated by calculating the difference between a second extension template partitioning area within the extension template of the current block and an area within the extension template of the second candidate reference block corresponding to the second extension template partitioning area. The image decoding device (2000) can determine the template cost corresponding to the candidate reference block combination according to the first candidate reference block and the second candidate reference block, and the predetermined candidate partitioning mode, as the sum of the first partitioning template cost and the second partitioning template cost.
[0393] In one embodiment of the present disclosure, the image decoding device (2000) can sort a plurality of candidate reference block combinations and / or a plurality of candidate partition modes in ascending order based on template costs calculated or determined according to an extension template.
[0394] In one embodiment of the present disclosure, the image decoding device (2000) can align a plurality of candidate partition modes based on a template cost according to the extension templates of the current block and a plurality of candidate reference blocks when the candidate reference block combination is determined by motion information.
[0395] Meanwhile, regarding multiple candidate partition modes, since they have been specifically explained in the preceding disclosure, redundant details are omitted.
[0396] In step S3030, the image decoding device (2000) can determine, among a plurality of aligned candidate partition modes, the candidate partition mode indicated by the geometric partition mode index of the current block as the geometric partition mode of the current block.
[0397] In one embodiment of the present disclosure, the image decoding device (2000) can determine, among a plurality of aligned candidate partition modes, the candidate partition mode indicated by the geometric partition mode index of the current block as the geometric partition mode for predicting the current block.
[0398] In one embodiment of the present disclosure, the image decoding device (2000) may determine a geometric partitioning mode for predicting the current block according to a geometric partitioning mode index indicating any one of the candidates included in a list of a plurality of aligned candidate reference block combinations and / or a plurality of candidate partitioning modes.
[0399] In one embodiment of the present disclosure, the image decoding device (2000) can determine a geometric partitioning mode for predicting the current block according to a geometric partitioning mode index indicating one of a plurality of candidate partitioning modes aligned according to a predetermined candidate reference block combination.
[0400] Meanwhile, regarding the operation of determining the candidate partition mode indicated by the geometric partition mode index of the current block as the geometric partition mode of the current block among a plurality of sorted candidate partition modes, redundant details are omitted as they have been explained in the preceding disclosure.
[0401] In step S3040, the image decoder (2000) can obtain a predicted block of the current block using a geometric partitioning mode of the determined current block.
[0402] In one embodiment of the present disclosure, an image decoding device (2000) can predict a current block by using a first reference block area corresponding to a first partition area within the current block and a second reference block area corresponding to a second partition area within the current block, using a geometric partitioning mode of the determined current block. After predicting the first partition area and the second partition area using the first reference block and the second reference block, the image decoding device (2000) can obtain a predicted block by blending the boundary between the first partition area and the second partition area using blending information for the current block.
[0403] In one embodiment of the present disclosure, the image decoding device (2000) can generate a prediction block of the current block using a geometric partitioning mode of the current block, and can restore or generate the current block using the prediction block and residual data.
[0404] Meanwhile, regarding the operation of acquiring a predicted block of the current block using the determined geometric partitioning mode of the current block, redundant details are omitted as they have been explained in the preceding disclosure.
[0405] FIG. 31 is a block diagram illustrating the configuration of an image encoding device according to one embodiment.
[0406] In one embodiment of the present disclosure, the memory (3110) and the processor (3130) may be implemented as at least one memory and at least one processor. In one embodiment of the present disclosure, when instructions are stored in the memory (3110), the operation of the prediction encoder (1915) and the entropy encoder (1925) illustrated in FIG. 19 may be implemented according to the instructions called by at least one process.
[0407] In one embodiment of the present disclosure, the image encoding device (3100) may include a storage medium that stores at least one of the following input / output data: a prediction encoding unit (1915), a conversion and quantization unit (1920), an entropy encoding unit (1925), an inverse quantization and inverse conversion unit (1930), and an in-loop filtering unit (1940) as shown in FIG. 19. The storage medium may be included in a memory (3110) or may be a different storage medium separate from the memory (3110).
[0408] Additionally, the video encoding device (3100) may include a storage medium control unit that controls the data input and output of the storage medium. The storage medium control unit may be included in the processor (3130), or it may be a control unit different from the processor (3130).
[0409] In one embodiment of the present disclosure, the image encoding device (3100) can determine the prediction mode of the current block in the current image. As the prediction mode of the current block, a prediction mode such as an intra mode, an inter mode, an intra block copy mode, and / or a palette mode may be used.
[0410] In one embodiment of the present disclosure, the image encoding device (3100) can generate information about the prediction mode of the current block using a determined prediction mode of the current block, and can generate a bitstream containing information about the prediction mode of the current block. For example, the image encoding device (3100) can generate an index representing the prediction mode of the current block, and can generate a bitstream containing the index representing the prediction mode of the current block.
[0411] In one embodiment of the present disclosure, the image encoding device (3100) may perform a prediction on the current block according to the prediction mode of the current block and encode the current block using the prediction block generated as a result of the prediction. The bitstream may include information regarding the prediction mode of the current block. The information regarding the prediction mode of the current block may be included in the sequence parameter set, picture parameter set, slice header, or slice data of the bitstream.
[0412] In one embodiment of the present disclosure, encoding of the current block may mean a process of generating information that enables an image decoding device (2000) to restore the current block. The information generated through encoding may be included in a bitstream after undergoing additional processing.
[0413] In one embodiment of the present disclosure, the image encoding device (3100) can encode the current block using the predicted block when a predicted block is generated through a prediction for the current block.
[0414] In one embodiment of the present disclosure, the image encoding device (3100) may generate residual data corresponding to the difference between the prediction block and the current block. If the prediction block is determined to be the current block, residual data may not be generated.
[0415] In one embodiment of the present disclosure, the image encoding device (3100) may generate a bitstream containing information generated according to the encoding of an image. The bitstream may include data generated as a result of encoding for the current block. The bitstream may include prediction information for the current block.
[0416] In one embodiment of the present disclosure, the image encoding device (3100) may determine to predict the current block according to a geometric partitioning mode for the current block. When the image encoding device (3100) determines to predict the current block according to a geometric partitioning mode for the current block, it may generate a flag containing information that the current block is predicted according to a geometric partitioning mode. The image encoding device (3100) may determine which of a plurality of candidate partitioning modes the current block is predicted using, and generate a geometric partitioning mode index of the current block indicating the geometric partitioning mode of the current block.
[0417] In one embodiment of the present disclosure, the image encoding device (3100) can sort the plurality of candidate partition modes by calculating a template cost according to the plurality of candidate reference blocks and the plurality of candidate partition modes, and can determine one of the plurality of candidate partition modes for the current block by using the rate-distortion cost for the current block and the candidate reference blocks. The image encoding device (3100) can generate a geometric partition mode index indicating the determined candidate partition mode, and the bitstream may include the geometric partition mode index.
[0418] In one embodiment of the present disclosure, the image encoding device (3100) may determine and store rate-distortion costs according to candidate reference block combinations, which are combinations of two candidate reference blocks among a plurality of candidate reference blocks, for a plurality of candidate partition modes. For example, if there are 5 candidate reference blocks included in the plurality of candidate reference blocks, the image encoding device (3100) may obtain 20 candidate reference block combinations according to 5X4. If there are a total of 64 candidate partition modes, the image encoding device (3100) may obtain 1280 rate-distortion costs according to 64X20 and store them in memory. Meanwhile, the number of candidate partition modes and the number of candidate reference blocks are not limited to the disclosed examples.
[0419] In one embodiment of the present disclosure, the image encoding device (3100) can determine a template cost by using a first template partition region within the extension template of the current block and samples of a region within the extension template of the first candidate reference block corresponding to the first template partition region, and a second template partition region within the extension template of the current block and samples of a region within the extension template of the second candidate reference block corresponding to the second template partition region. The image encoding device (3100) can align a plurality of candidate partition modes for each of a plurality of candidate reference block combinations based on the determined template costs.
[0420] In one embodiment of the present disclosure, the image encoding device (3100) may sort a plurality of candidate partition modes in ascending order for a predetermined candidate reference block combination, and then sort a plurality of candidate partition modes according to a previously stored rate-distortion cost using only some of the candidate partition modes with a low template cost. Additionally, the image encoding device (3100) may sort a plurality of candidate partition modes for all candidate reference block combinations. The image encoding device (3100) may sort the list again according to the rate-distortion cost according to some candidate reference block combinations and some candidate partition modes, and then determine a geometric partition mode index and a blending index for the current block based on the result of performing blending at the partition boundary for each. The image encoding device (3100) may generate a bitstream including the geometric partition mode index and the blending index. The image encoding device (3100) may also generate a bitstream including information about a first reference block and a second reference block for a geometric partition mode.
[0421] Meanwhile, in one embodiment of the present disclosure, the rate-distortion cost may be a value determined by using one or more of the following operations for a first partitioned region within the current block and samples of a first candidate reference block region corresponding to the first partitioned region, and a second partitioned region within the current block and samples of a second candidate reference block region corresponding to the second partitioned region: SAD (Sum of Absolute Difference), SATD (Sum of Absolute Transformed Difference), SSE (Sum of Squared Error), MR-SAD (Mean Removed SAD), MR-SSE (Mean Removed SSE), and HoG (Histogram of Oriented Gradient).
[0422] In one embodiment of the present disclosure, the geometric partitioning mode index and / or blending index may be included in the sequence parameter set, picture parameter set, slice header, or slice data of the bitstream. Meanwhile, the geometric partitioning mode index and / or blending index may be collectively referred to as information related to the geometric partitioning mode.
[0423] In one embodiment of the present disclosure, the image encoding device (3100) can further improve the quality of the image by performing a prediction according to a geometric partitioning mode using an extended template for the current block and candidate reference blocks.
[0424] In one embodiment of the present disclosure, the image encoding device (3100) can transmit the bitstream to the image decoding device (2000) through a network.
[0425] In one embodiment of the present disclosure, the image encoding device (3100) can store a bitstream in a data storage medium including a magnetic medium such as a hard disk, a floppy disk and a magnetic tape, an optical recording medium such as a CD-ROM and a DVD, a magneto-optical medium such as a floptical disk, etc.
[0426] In one embodiment of the present disclosure, the image encoding device (3100) may generate a bitstream including syntax elements generated through the encoding of an image. Values corresponding to the syntax elements may be included in the bitstream according to the hierarchical structure of the image.
[0427] In one embodiment of the present disclosure, an image encoding device (3100) may encode bins of syntax elements and include them in a bitstream. The encoding operation may include at least one of a binarization and an entropy encoding operation.
[0428] In one embodiment of the present disclosure, the operation of the image encoding device (3100) may be the same as the operation of the image decoding device (2000), so the same content is omitted.
[0429] FIG. 32 is a flowchart of an image encoding method according to one embodiment.
[0430] In step S3210, the image encoding device (3100) can align a plurality of candidate partition modes based on template costs by using an extension template of the current block extended in a direction parallel to the template of the current block and extension templates of candidate reference blocks extended in a direction parallel to the candidate reference blocks.
[0431] In one embodiment of the present disclosure, the image encoding device (3100) can sort a plurality of template costs corresponding to each of a plurality of candidate partition modes in ascending order using the extension template of the current block and the extension templates of the candidate reference blocks. The image encoding device (3100) can sort by calculating the template costs for each of the plurality of candidate reference block combinations and the plurality of candidate partition modes.
[0432] In one embodiment of the present disclosure, the image encoding device (3100) can determine a template cost by using a first template partition region within the extension template of the current block and samples of a region within the extension template of the first candidate reference block corresponding to the first template partition region, and a second template partition region within the extension template of the current block and samples of a region within the extension template of the second candidate reference block corresponding to the second template partition region. The image encoding device (3100) can align a plurality of candidate partition modes for each of a plurality of candidate reference block combinations based on the determined template costs.
[0433] Meanwhile, regarding the operation of aligning multiple candidate partition modes based on template costs, redundant details are omitted as they have been explained in the preceding disclosure.
[0434] In step S3220, the image encoding device (3100) can determine a geometric partition mode index of the current block that indicates a candidate partition mode for predicting the current block among a plurality of aligned candidate partition modes.
[0435] In one embodiment of the present disclosure, the image encoding device (3100) may, for each of a plurality of candidate reference block combinations, reorder some of the candidate partition modes that are aligned based on the template cost and have a low template cost according to the rate-distortion cost. For example, the image encoding device (3100) may, for each of a plurality of candidate reference block combinations, extract only some of the partition modes with a low template cost and reorder all candidate reference block combinations according to the rate-distortion cost.
[0436] In one embodiment of the present disclosure, the image encoding device (3100) can determine or obtain a geometric partition mode index and / or a blending index by performing a blending operation only on some candidates with low rate-distortion costs in a list rearranged according to rate-distortion costs for each of a plurality of candidate reference block combinations and a plurality of candidate partition modes.
[0437] Meanwhile, regarding the operation of determining the geometric partition mode index of the current block that indicates the candidate partition mode for predicting the current block, redundant details are omitted as they have been explained in the preceding disclosure.
[0438] In step S3230, the video encoding device (3100) can generate a bitstream containing a geometric partition mode index for the current block.
[0439] In one embodiment of the present disclosure, the image encoding device (3100) can generate a determined geometric partitioning mode index and can generate a blending index. The image encoding device (3100) can generate a bitstream including the geometric partitioning mode index and / or the blending index.
[0440] Meanwhile, regarding the operation of generating a bitstream containing a geometric partition mode index for the current block, redundant details are omitted as they have been described in the preceding disclosure.
[0441] In one embodiment of the present disclosure, an image decoding method is provided. The image decoding method may include the step (S3010) of obtaining a geometric partitioning mode index of the current block from a bitstream. The image decoding method may include the step (S3020) of sorting a plurality of candidate partitioning modes based on a template cost using an extended template of the current block extended in a direction parallel to the template of the current block and extended templates of candidate reference blocks extended in a direction parallel to the templates of candidate reference blocks. The image decoding method may include the step (S3030) of determining a candidate partitioning mode indicated by the geometric partitioning mode index of the current block among the sorted plurality of candidate partitioning modes as the geometric partitioning mode of the current block. The image decoding method may include the step (S3040) of obtaining a predicted block of the current block using the determined geometric partitioning mode of the current block.
[0442] In one embodiment of the present disclosure, the image decoding method may include the step of sampling samples included in each of the extension template of the current block and the extension templates of the candidate reference blocks, and calculating a plurality of template costs corresponding to each of the plurality of candidate partition modes.
[0443] In one embodiment of the present disclosure, the image decoding method may include the step of calculating a plurality of template costs corresponding to each of a plurality of candidate partition modes using a first sample value corresponding to an area containing samples included in the current block adjacent to an extension template of the current block and a second sample value corresponding to an area containing samples included in the candidate reference blocks adjacent to an extension template of the candidate reference blocks.
[0444] In one embodiment of the present disclosure, the image decoding method may include the step of determining a plurality of template costs corresponding to each of a plurality of candidate partitioning modes according to the partitioning ratio in which the current block is partitioned by each of a plurality of candidate partitioning modes.
[0445] In one embodiment of the present disclosure, the extension template of the current block and the extension templates of the candidate reference blocks may each be characterized by being extended by a factor of two in a direction parallel to the template of the current block and in a direction parallel to the templates of the candidate reference blocks.
[0446] In one embodiment of the present disclosure, the extension template of the current block and the extension templates of the candidate reference blocks can be adaptively determined according to the shape of the current block and a plurality of candidate partition modes.
[0447] In one embodiment of the present disclosure, the template cost may be determined using one or more of SAD (Sum of Absolute Difference), SATD (Sum of Absolute Transformed Difference), SSE (Sum of Squared Error), MR-SAD (Mean Removed SAD), MR-SSE (Mean Removed SSE), and HoG (Histogram of Oriented Gradient).
[0448] In one embodiment of the present disclosure, the image decoding method may include the step of determining a plurality of template costs by downsampling the extension template of the current block and the extension templates of candidate reference blocks in an extended direction.
[0449] In one embodiment of the present disclosure, the first sample values may be determined using first current template samples extended in an area adjacent to the current block among the samples included in the extension template of the current block, and second current template samples adjacent to the first current template samples among the samples included in the extension template of the current block.
[0450] In one embodiment of the present disclosure, the first sample values may be determined using at least one of the first current template samples extended in an area adjacent to the current block among the samples included in the extension template of the current block, the first reference template samples extended in an area adjacent to the candidate reference blocks among the samples included in the extension templates of the candidate reference blocks, the second current template samples adjacent to the first current template samples among the samples included in the extension template of the current block, and the second reference template samples adjacent to the first reference template samples among the samples included in the extension templates of the candidate reference blocks.
[0451] In one embodiment of the present disclosure, the image decoding device (2000) may include at least one memory (2010) storing at least one instruction; and at least one processor (2030) operating according to at least one instruction. The at least one processor (2030) may obtain a geometric partition mode index of the current block from a bitstream, sort a plurality of candidate partition modes based on a template cost using an extended template of the current block extended in a direction parallel to the template of the current block and extended templates of candidate reference blocks extended in a direction parallel to the templates of candidate reference blocks, determine a candidate partition mode indicated by the geometric partition mode index of the current block among the sorted plurality of candidate partition modes as the geometric partition mode of the current block, and obtain a prediction block of the current block using the determined geometric partition mode of the current block.
[0452] In one embodiment of the present disclosure, an image encoding method may be provided. The image encoding method may include a step (S3210) of aligning a plurality of candidate partition modes based on a template cost using an extended template of the current block extended in a direction parallel to the template of the current block and extended templates of candidate reference blocks extended in a direction parallel to the candidate reference blocks. The image encoding method may include a step (S3220) of determining a geometric partition mode index of the current block that indicates a candidate partition mode for predicting the current block among the aligned plurality of candidate partition modes. The image encoding method may include a step (S3230) of generating a bitstream including a geometric partition mode index for the current block.
[0453] In one embodiment of the present disclosure, the image encoding device (3100) may include at least one memory (3110) for storing at least one instruction; and at least one processor (3130) for operating according to at least one instruction. The at least one processor (3130) may sort a plurality of candidate partition modes based on a template cost using an extended template of the current block extended in a direction parallel to the template of the current block and extended templates of candidate reference blocks extended in a direction parallel to the candidate reference blocks, determine a geometric partition mode index of the current block indicating a candidate partition mode for predicting the current block among the sorted plurality of candidate partition modes, and generate a bitstream including a geometric partition mode index for the current block. In one embodiment of the present disclosure, a computer-readable recording medium for storing a bitstream generated by the image encoding method may be provided. The bitstream may include a geometric partition mode index of the current block. The geometric partition mode index of the current block may be an index indicating one of a plurality of candidate partition modes sorted based on template costs, using an extension template of the current template extended in a direction parallel to the template of the current block and extension templates of candidate reference blocks extended in a direction parallel to the templates of candidate reference blocks. The candidate partition mode indicated by the geometric partition mode index of the current block may be characterized as being used for the prediction of the current block.
[0454] A device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory storage medium' simply means that it is a tangible device and does not contain a signal (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently and cases where it is stored temporarily. For example, a 'non-transitory storage medium' may include a buffer in which data is stored temporarily.
[0455] According to one embodiment, the method according to the various embodiments disclosed herein may be provided by being included in a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or distributed online (e.g., download or upload) through an application store or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product (e.g., downloadable app) may be temporarily stored or temporarily created on a device-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.
Claims
1. In a video decoding method, Step of obtaining the Geometric Partitioning Mode index of the current block from the bitstream (S3010); A step (S3020) of aligning a plurality of candidate partition modes based on template costs using an extended template of the current block extended in a direction parallel to the template of the current block and extended templates of the candidate reference blocks extended in a direction parallel to the templates of the candidate reference blocks; A step (S3030) of determining, among the above-mentioned aligned plurality of candidate partition modes, the candidate partition mode indicated by the geometric partition mode index of the current block as the geometric partition mode of the current block; and A method comprising the step (S3040) of obtaining a predicted block of the current block using the geometric division mode of the current block determined above.
2. In Paragraph 1, The step of aligning the above plurality of candidate partition modes based on template cost is, A method comprising the step of sampling samples included in each of the extension templates of the current block and the extension templates of the candidate reference blocks, and calculating a plurality of template costs corresponding to each of the plurality of candidate partition modes.
3. In Paragraph 1 or 2, The step of aligning the above plurality of candidate partition modes based on template cost is, A method comprising the step of calculating a plurality of template costs corresponding to each of the plurality of candidate partition modes using a first sample value corresponding to an area containing samples included in the current block adjacent to the extension template of the current block and a second sample value corresponding to an area containing samples included in the candidate reference blocks adjacent to the extension template of the candidate reference blocks.
4. In any one of paragraphs 1 through 3, The step of aligning the above plurality of candidate partition modes based on template cost is, A method comprising the step of determining a plurality of template costs corresponding to each of the plurality of candidate partition modes according to the partitioning ratio in which the current block is partitioned by each of the plurality of candidate partition modes.
5. In any one of paragraphs 1 through 4, The extension template of the current block and the extension templates of the candidate reference blocks are, A method characterized by being expanded by a factor of 2 in a direction parallel to the template of the current block and in a direction parallel to the templates of the candidate reference blocks, respectively.
6. In any one of paragraphs 1 through 4, The extension template of the current block and the extension templates of the candidate reference blocks are, A method adaptively determined according to the shape of the current block and the plurality of candidate partition modes.
7. In any one of paragraphs 1 through 6, The above template cost is, A method determined using one or more of SAD (Sum of Absolute Difference), SATD (Sum of Absolute Transformed Difference), SSE (Sum of Squared Error), MR-SAD (Mean Removed SAD), MR-SSE (Mean Removed SSE), and HoG (Histogram of Oriented Gradient).
8. In Paragraph 2, The step of calculating a plurality of template costs corresponding to each of the above plurality of candidate partition modes is: A method comprising the step of determining the plurality of template costs by downsampling the extension template of the current block and the extension templates of the candidate reference blocks in an extended direction.
9. In Paragraph 3, The above first sample values are, A method determined by using first current template samples extended in an area adjacent to the current block among samples included in the extension template of the current block, and second current template samples adjacent to the first current template samples among samples included in the extension template of the current block.
10. In Paragraph 3, The above first sample values are, Among the samples included in the extension template of the current block, the first current template samples extended in an area adjacent to the current block, and among the samples included in the extension templates of the candidate reference blocks, the first reference template samples extended in an area adjacent to the candidate reference blocks, and A method determined by using at least one of the second current template samples adjacent to the first current template samples among the samples included in the extension template of the current block and the second reference template samples adjacent to the first reference template samples among the samples included in the extension templates of the candidate reference blocks.
11. In a video encoding method, A step (S3210) of aligning a plurality of candidate partition modes based on template costs using an extension template of the current block extended in a direction parallel to the template of the current block and extension templates of the candidate reference blocks extended in a direction parallel to the candidate reference blocks; A step (S3220) of determining a geometric partition mode index of the current block that indicates a candidate partition mode for predicting the current block among the above-mentioned multiple aligned candidate partition modes; and A method comprising the step (S3230) of generating a bitstream including a geometric partition mode index for the current block.
12. A computer-readable recording medium storing a bitstream generated by a video encoding method, The above bitstream is, Includes the geometric partitioning mode index of the current block, The geometric partitioning mode index of the current block above is, An index indicating one of a plurality of candidate partition modes sorted based on template cost, using an extension template of the current template extended in a direction parallel to the template of the current block and extension templates of the candidate reference blocks extended in a direction parallel to the templates of the candidate reference blocks. A recording medium characterized in that the candidate partition mode indicated by the geometric partition mode index of the current block is used for the prediction of the current block.
Citation Information
Patent Citations
Service providing server that provides NFT issuance service for proof of ownership of e-book data and operating method thereof
KR1020230147847A
Vibration-based pipe flow rate measurement method and system therefor
KR1020250024316A
Anti-cntn4 antibody and conjugate thereof
KR1020250148368A
Method of controlling vehicle and vehicle implementing the same
KR1020260051195A
Insulating partition for construction
KR102818149B1