Method and device for filtering image
A multi-channel kernel-based filtering method addresses spatial and temporal redundancies in video compression by classifying image blocks and applying predefined filters, resulting in improved image quality and encoding efficiency.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CO LTD
- Filing Date
- 2025-10-27
- Publication Date
- 2026-05-07
AI Technical Summary
Existing image encoding and decoding methods struggle to effectively eliminate spatial and temporal redundancies in video compression, leading to artifacts and inefficiencies in the encoding and decoding processes.
Implementing a multi-channel kernel-based filtering method that determines the class of each block in an image based on sample value changes, applies predefined filter kernels, and uses an expected error to enhance the filtering process during in-loop filtering.
Improves the quality of encoded and decoded images by reducing artifacts and enhancing compression efficiency through targeted filtering techniques.
Smart Images

Figure KR2025017175_07052026_PF_FP_ABST
Abstract
Description
Image filtering method and device
[0001] The present disclosure relates to the field of image filtering, and more specifically, to an apparatus and method for performing in-loop filtering during the encoding or decoding process of an image.
[0002] In video encoding and decoding, the video is divided into blocks, and each block can be predictively encoded and predictedly decoded through inter prediction or intra prediction.
[0003] Inter-prediction can be a technique for compressing images by eliminating temporal redundancy between images. In inter-prediction, blocks of the current image can be 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 can be generated by subtracting the predicted block generated as a result from the current block.
[0004] Intra prediction can be a technique for compressing an image by eliminating spatial redundancy within the image. In intra prediction, a prediction block can be generated based on the surrounding pixels of the current block according to the intra prediction mode. Additionally, a residual block can be generated by subtracting the prediction block from the current block. The intra prediction mode used to generate the prediction block can be signaled to the decoder side through a predetermined method.
[0005] Residual blocks generated through inter-prediction or intra-prediction can be passed to a decoder after undergoing transformation and quantization.
[0006] The encoder and decoder can reconstruct the current block by combining the prediction block and the residual block of the current block. The encoder and decoder can remove artifacts within the current block by applying a deblocking filter and / or an adaptive loop filter to the reconstructed current block.
[0007] A method for decoding an image according to one embodiment may include a step of determining the class of the current block based on the amount of change in the sample value for each sample within the current block.
[0008] A method for decoding an image according to one embodiment may include the step of determining a multi-channel kernel applied to a current block based on the class of the current block.
[0009] In one embodiment, the multi-channel kernel may include a plurality of predefined filter kernels.
[0010] A decoding method for an image according to one embodiment may include the step of determining a feature vector for a current sample by applying a plurality of filter kernels included in a multi-channel kernel to each current sample within a current block.
[0011] A method for decoding an image according to one embodiment may include the step of obtaining an expected error mapped by a feature vector from a predefined data set.
[0012] A method for decoding an image according to one embodiment may include a step of filtering a current sample using an expected error.
[0013] An image decoding device according to one embodiment may include at least one memory for storing at least one instruction, and at least one processor for operating according to at least one instruction.
[0014] A processor included in an image decoding device according to one embodiment determines the class of the current block based on the amount of change of sample values for each sample in the current block, and determines a multi-channel kernel applied to the current block based on the class of the current block, wherein the multi-channel kernel includes a plurality of predefined filter kernels, and by applying each of the plurality of filter kernels included in the multi-channel kernel to the current sample in the current block, a feature vector for the current sample is determined, an expected error mapped by the feature vector is obtained from a predefined data set, and the current sample can be filtered using the expected error.
[0015] An image encoding method according to one embodiment may include a step of determining the class of the current block based on the amount of change in the sample value for each sample within the current block.
[0016] A method for encoding an image according to one embodiment may include the step of determining a multi-channel kernel applied to a current block based on the class of the current block.
[0017] In one embodiment, the multi-channel kernel may include a plurality of predefined filter kernels.
[0018] An image encoding method according to one embodiment may include the step of determining a feature vector for a current sample by applying a plurality of filter kernels included in a multi-channel kernel to each current sample within a current block.
[0019] An image encoding method according to one embodiment may include the step of obtaining an expected error mapped by a feature vector from a predefined data set.
[0020] An image encoding method according to one embodiment may include a step of filtering a current sample using an expected error.
[0021] An image encoding device according to one embodiment may include at least one memory for storing at least one instruction, and at least one processor for operating according to at least one instruction.
[0022] A processor included in an image encoding device according to one embodiment determines the class of the current block based on the amount of change of sample values for each sample in the current block, and determines a multi-channel kernel applied to the current block based on the class of the current block, wherein the multi-channel kernel includes a plurality of predefined filter kernels, and by applying each of the plurality of filter kernels included in the multi-channel kernel to the current sample in the current block, a feature vector for the current sample is determined, an expected error mapped by the feature vector is obtained from a predefined data set, and the current sample can be filtered using the expected error.
[0023] A computer-readable recording medium according to one embodiment may include a bitstream.
[0024] In one embodiment, the bitstream may include filter information used to filter the current image according to a filtering method.
[0025] In one embodiment, the bitstream may include an encoding result generated based on a current image that is filtered according to a filtering method.
[0026] In one embodiment, the bitstream may include an encoding result generated based on a current image that is filtered according to an image encoding method.
[0027] FIG. 1 is a block diagram of an image decoding device according to one embodiment.
[0028] FIG. 2 is a block diagram of an image encoding device according to one embodiment.
[0029] FIG. 3 illustrates a process of determining at least one encoding unit by dividing the current encoding unit according to one embodiment.
[0030] 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.
[0031] 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.
[0032] FIG. 6 illustrates a method for determining a predetermined encoding unit among an odd number of encoding units according to one embodiment.
[0033] 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.
[0034] 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.
[0035] FIG. 9 illustrates a process of determining at least one encoding unit by dividing a first encoding unit according to one embodiment.
[0036] 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] 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.
[0043] 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.
[0044] 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.
[0045] FIG. 19 is a block diagram of an image encoding and decoding system according to one embodiment.
[0046] FIG. 20 is a block diagram illustrating the configuration of a filtering device according to one embodiment.
[0047] FIG. 21 is a diagram illustrating a multi-channel kernel-based sample filtering process according to one embodiment of the present disclosure.
[0048] FIG. 22 is a drawing for explaining an edge classification process according to one embodiment of the present disclosure.
[0049] FIG. 23 is a drawing illustrating an example of a vertical kernel for extracting vertical features according to one embodiment of the present disclosure.
[0050] FIG. 24 is a drawing illustrating an example of a horizontal kernel for extracting horizontal features according to one embodiment of the present disclosure.
[0051] FIG. 25 is a drawing illustrating an example of a mixing kernel for extracting mixed features according to one embodiment of the present disclosure.
[0052] FIG. 26 is a drawing illustrating an example of a spatial kernel for extracting spatial features according to one embodiment of the present disclosure.
[0053] FIG. 27 is a drawing illustrating the arrangement of guide detail filters in an in-loop filter pipeline according to one embodiment of the present disclosure.
[0054] FIG. 28 is a drawing illustrating the arrangement of guide detail filters in an in-loop filter pipeline according to one embodiment of the present disclosure.
[0055] FIG. 29 is a drawing illustrating the arrangement of guide detail filters in an in-loop filter pipeline according to one embodiment of the present disclosure.
[0056] FIG. 30 is a flowchart for explaining a filtering method of an image according to one embodiment.
[0057] 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.
[0058] In describing the embodiments, detailed descriptions of related prior art may be omitted if it is determined that such detailed descriptions would unnecessarily obscure the essence of the present disclosure. Additionally, numbers used in the description of the embodiments (e.g., first, second, etc.) may serve as identification symbols to distinguish one component from another.
[0059] 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.
[0060] 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.
[0061] 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 performed by other components.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] FIG. 1 illustrates a block diagram of an image decoding device (100) according to one embodiment.
[0066] 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.
[0067] 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.
[0068] To explain in detail the operation of the video decoding device (100), the bitstream acquisition unit (110) can receive a bitstream.
[0069] 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.
[0070] In the following, the division of a encoding unit according to one embodiment of the present disclosure will be described in detail.
[0071] 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.
[0072] 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.
[0073] 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.
[0074] A single maximum coding block (CTB) can be divided into MxN coding blocks containing MxN samples (M and N are integers).
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] For example, information indicating whether quad splitting is performed can indicate whether the current encoding unit will be quad split or not.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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).
[0087] 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.
[0088] 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.
[0089] 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.
[0090] The shape and size of the transformation block and the prediction block may not be related to each other.
[0091] 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.
[0092] 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 the maximum encoding unit, the encoding unit, the prediction block, and the 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.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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., according to 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) according to 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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).
[0105] 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).
[0106] 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.
[0107] 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.
[0108] 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.
[0109] 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.
[0110] 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.
[0111] 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 split-form mode information, and the image decoding device (100) can obtain a plurality of second encoding units (e.g., 510) of various forms by dividing the first encoding unit (500) based on the obtained split-form mode information, and the second encoding unit (510) can be divided according to the method in which the first encoding unit (500) was divided based on the split-form mode information. According to one embodiment, when the first encoding unit (500) is divided into the second encoding unit (510) based on the split-form mode information for the first encoding unit (500), the second encoding unit (510) can also be divided into third encoding units (e.g., 520a, 520b, 520c, 520d, etc.) based on the split-form 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.
[0112] 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.
[0113] 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) to not be further divided or to be divided a set number of times.
[0114] 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).
[0115] 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.
[0116] 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.
[0117] 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.
[0118] 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.
[0119] 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.
[0120] 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).
[0121] 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.
[0122] 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.
[0123] 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).
[0124] 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.
[0125] 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).
[0126] 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.
[0127] 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.
[0128] 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.
[0129] 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.
[0130] 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.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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).
[0136] FIG. 7 illustrates the order in which a plurality of encoding units are processed when an image decoding device (100) determines a plurality of encoding units by dividing a current encoding unit according to one embodiment.
[0137] 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.
[0138] 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.).
[0139] 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).
[0140] 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.
[0141] 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.
[0142] 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.
[0143] 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).
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] 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.
[0149] According to one embodiment, the image decoding device (100) can divide the first encoding unit to determine various forms of encoding units.
[0150] 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.
[0151] 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.
[0152] 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.
[0153] 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.
[0154] 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.
[0155] 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.).
[0156] 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.
[0157] 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).
[0158] 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).
[0159] 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.
[0160] According to one embodiment, the image decoding device (100) may divide a first encoding unit (1200) based on 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 a 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.
[0161] 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.
[0162] 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.
[0163] 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.
[0164] 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.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] 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.
[0169] 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.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] 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).
[0175] 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.
[0176] 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.
[0177] 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).
[0178] 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).
[0179] 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.
[0180] 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).
[0181] 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).
[0182] 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.
[0183] 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).
[0184] 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.
[0185] According to one embodiment, the image decoding device (100) may use a predetermined data unit in which recursive division of the encoding unit begins.
[0186] 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.
[0187] 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.
[0188] 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.
[0189] 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.
[0190] 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.
[0191] 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.
[0192] 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.
[0193] 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.
[0194] According to one embodiment, the image decoding device (100) may utilize at least one reference encoding unit included in one maximum encoding unit. 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.
[0195] 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.
[0196] A method for determining a division rule according to one embodiment of the present disclosure will be described in detail below.
[0197] 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.
[0198] 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).
[0199] The shape of the encoding unit may include square and non-square. When 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, when 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.
[0200] 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.
[0201] 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.
[0202] 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.
[0203] 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.
[0204] 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.
[0205] 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.
[0206] 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.
[0207] 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.
[0208] According to one embodiment, a bitstream acquisition unit (110) of an image decoding device (100) may acquire a bitstream including 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) of 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.
[0209] 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.
[0210] 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.
[0211] 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.
[0212] 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.
[0213] 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 image decoding device (100) can use variable length coding (VLC) rather than fixed length coding (FLC) to use binary code representing segmented form mode information.
[0214] 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.
[0215] 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.
[0216] 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.
[0217] 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).
[0218] 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.
[0219] 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.
[0220] 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.
[0221] 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.
[0222] 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.
[0223] 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.
[0224] 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).
[0225] FIG. 19 is a block diagram of an image encoding and decoding system according to one embodiment.
[0226] 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).
[0227] 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 to 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 deblocking filtering unit (1935) and the 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).
[0228] 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 deblocking filtering unit (1965) and the loop filtering unit (1970) can perform filtering on the spatial domain image data to output a restored image for the current original image. The restored image can be used as a reference image for the next original image by the prediction decoding unit (1975).
[0229] The loop filtering unit (1940) of the encoding unit (1910) performs loop filtering using filter information input according to user input or system settings. The filter information used by the 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 loop filtering unit (1970) of the decoding unit (1950) can perform loop filtering based on the filter information input from the decoding unit (1950).
[0230] 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.
[0231] 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.
[0232] 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.
[0233] 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).
[0234] 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.
[0235] 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.
[0236] 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.
[0237] 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.
[0238] 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.
[0239] 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.
[0240] 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.
[0241] 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.
[0242] 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.
[0243] FIG. 20 is a block diagram illustrating the configuration of a filtering device according to one embodiment.
[0244] Referring to FIG. 20, the filtering device (2000) may include a classifier (2010) and a filter section (2030).
[0245] The classifier (2010) and the filter unit (2030) may be implemented with at least one processor. At least one processor may include processing circuitry.
[0246] The classifier (2010) and the filter unit (2030) can operate according to at least one instruction stored in at least one memory.
[0247] The filtering device (2000) may include at least one memory that stores input / output data of the classifier (2010) and the filter unit (2030). The filtering device (2000) may include a memory control unit that controls the data input / output of at least one memory.
[0248] In one embodiment, the filtering device (2000) may correspond to the loop filtering unit (1940, 1970) illustrated in FIG. 19. In one embodiment, the filtering device (2000) may be included in each of the image decoding device (100) and the image encoding device (200). That is, the filtering method performed by the filtering device (2000) may be included in the image decoding method performed by the image decoding device (100). The filtering method performed by the filtering device (2000) may be included in the image encoding method performed by the image encoding device (200).
[0249] In one embodiment, the filtering device (2000) can generate a filtered image from an input image. The filtering device (2000) can classify samples or blocks included in the image according to characteristics and filter samples included in the image using a filter suitable for the classification result.
[0250] In one embodiment, the classifier (2010) can determine which of several classes each of the samples or blocks included in the image belongs to.
[0251] The filter unit (2030) can determine a filter (or filter coefficients) to be used for filtering samples within a block by considering at least one of the classification result or filter information by the classifier (2010). The filter unit (2030) can generate filtered samples by applying the adaptively determined filter to one sample and its surrounding samples.
[0252] In one embodiment, if the classification process by the classifier (2010) is performed in block units, the same filter may be applied to samples included in the same block. In one embodiment, if the classification process by the classifier (2010) is performed in sample units, a filter determined independently for each sample may be applied to each sample within the image.
[0253] In one embodiment, the image classified by the classifier (2010) may include at least one of a reconstructed image, a Gaussian-filtered image, a before-blocking-filter image, a deblocking-filtered reconstructed image, a predicted image, a residual image, a reconstructed image with a fixed filter applied, a predicted image with a fixed filter applied, or a residual image with a fixed filter applied.
[0254] Here, the predicted image may be an image generated through intra-prediction or inter-prediction of blocks, and the residual image may be an image corresponding to the difference between the original image and the predicted image. Additionally, the reconstructed image may be an image generated as a result of combining the predicted image and the residual image.
[0255] A deblocking filter can be applied to the restored image to remove artifacts between blocks. A fixed filter may represent a filter in which filter coefficients are predetermined between the image encoding device (200) and the image decoder (100). In other words, a fixed filter may represent a filter predefined in the image encoding device (200) and the image decoder (100).
[0256] In one embodiment, the image filtered by the filter unit (2030) may include at least one of a restored image, a Gaussian-filtered image, an image prior to the application of a deblocking filter, a deblocking-filtered restored image, a prediction image, a residual image, a restored image with a fixed filter applied, a prediction image with a fixed filter applied, or a residual image with a fixed filter applied.
[0257] In one embodiment, when a plurality of images are filtered by the filter unit (2030), the filtered images can be combined (e.g., weighted combination) to obtain a final filtered image.
[0258] In one embodiment, the types of images classified by the classifier (2010) and the images filtered by the filter unit (2030) may be different from each other. For example, a deblocking filtered restored image may be filtered based on the classification result for the residual image. As another example, based on the classification result for the deblocking filtered restored image or the residual image, a restored image, a deblocking filtered restored image, a restored image with a fixed filter applied, a residual image, and a residual image with a fixed filter applied may be filtered.
[0259] The types of images classified by the classifier (2010) and images filtered by the filter unit (2030) are not limited to the examples mentioned and can be determined by various combinations.
[0260] In one embodiment, the types of images classified by the classifier (2010) and the images filtered by the filter unit (2030) may be the same.
[0261] In the following description, the current image is input to the classifier (2010) and the filter unit (2030), but the type of image input to the classifier (2010) and the type of image input to the filter unit (2030) may be the same or different from each other.
[0262] When a classification result of the current image is obtained by the classifier (2010), the filter unit (2030) can determine a filter suitable for filtering samples within the current image according to the classification result and / or filter information. Then, the filter unit (2030) can filter samples within the current image using the determined filter.
[0263] In one embodiment, filter information may be obtained from a bitstream. Alternatively, in one embodiment, filter information may be derived without signaling in the same way from the image encoding device (200) and the image decoding device (100).
[0264] In one embodiment, the bitstream may correspond to the encoding result of the image. In one embodiment, the bitstream may be generated by an image encoding device (200) and transmitted to an image decoding device (100).
[0265] In one embodiment, the bitstream may be stored on a storage medium such as an optical medium, a hard disk, etc.
[0266] In one embodiment, the filter information may include at least one of information indicating whether adaptive filtering is applied to the current image or a block within the current image (e.g., a slice, a maximum encoding unit, or a group of maximum encoding units), information indicating which of several adaptation parameter sets (APS) included in the bitstream is used for the current image or a block within the current image, or information indicating which of several filter sets is used for the current image or a block within the current image.
[0267] In one embodiment, the APS may include information about filter coefficients, and a filter identified from the classification result by the classifier (2010) may be applied to a sample in the current image. In one embodiment, the classification result by the classifier (2010) may be the class (or class index) of the current block. The filter identified from the classification result may be a filter corresponding to the class of the current block within a filter set.
[0268] In the following, a method is proposed to improve coding efficiency by enhancing the preservation of local details of each sample within a recovery frame during the in-loop filtering process. According to an embodiment of the present disclosure, a filtering device (2000) can predict a coding error on a sample-by-sample basis using a multi-channel kernel and generate a filtered sample based on the predicted coding error.
[0269] In the present disclosure, a sample filtering method using a multi-channel kernel may be referred to as a Guided Detail Filter (GDF). Alternatively, in the present disclosure, a multi-channel kernel may be referred to as a GDF. A GDF may be an example of an in-loop filter. Unlike conventional in-loop filters, a GDF is designed around sample-by-sample error prediction and correction processes, thereby preserving local detail information without side effects and efficiently reducing bit usage.
[0270] In addition, in the present disclosure, a multi-channel kernel represents a set of filter kernels designed to multidimensionally extract local characteristics of a sample to be filtered. That is, the multi-channel kernel may include a plurality of filter kernels. A filter kernel is a set of filter coefficients and may be referred to as a kernel, a filter, a filter coefficient, or a set of filter coefficients. Additionally, the multi-channel kernel may be referred to as a filter set, a set of filter kernels, a kernel set, a multi-channel filter, or a multi-channel filter kernel. Hereinafter, a GDF-based filtering process will be described in detail with reference to FIGS. 21 to 25.
[0271] The encoding efficiency of video coding can be improved by performing correction of GDF-based reconstructed sample values during the in-loop filtering process. Different samples have varying levels of local activity along with different encoding settings, and it is observed that the magnitude of the encoding error varies accordingly. According to an embodiment of the present disclosure, by accurately identifying the characteristics of the samples based on local activity and encoding conditions, the correction process can be effectively customized to adjust the reconstruction of each sample to a higher quality.
[0272] FIG. 21 is a diagram illustrating a multi-channel kernel-based sample filtering process according to one embodiment of the present disclosure.
[0273] A GDF according to one embodiment of the present disclosure may include a structure for independently correcting the expected error of each sample on a sample-by-sample basis within an in-loop filtering structure. The GDF of the present disclosure may operate in a manner that independently derives the expected error for each pixel.
[0274] Referring to FIG. 21, a filtering device (2000) can use a multi-channel kernel to extract local characteristics of a sample to be filtered (hereinafter referred to as the current sample) to derive an expected error, and filter the sample to be filtered using the derived expected error. In the present disclosure, the expected error may be referred to as a sample correction value, a pixel correction value, a prediction correction value, an expected correction value, a predicted error, an expected coding error, a predicted coding error, etc.
[0275] According to one embodiment of the present disclosure, the filtering device (2000) may include an edge classifier (2110), a multi-channel filter unit (2120), a quantization unit (2130), and a sample correction unit (2140). Alternatively, the filtering device (2000) may include an edge classifier (2110), a multi-channel filter unit (2120), a quantization unit (2130), a sample correction unit (2140), a multi-channel kernel set (2150), and an expected error set (2160). However, the content of the present disclosure is not limited thereto, and some of the configurations shown in FIG. 21 may be omitted, and other configurations may be added.
[0276] In one embodiment, the edge classifier (2110) may be implemented with the configuration included in the classifier (2010) shown in FIG. 20. Also, in one embodiment, the multi-channel filter unit (2120), quantization unit (2130), and sample correction unit (2140) may be implemented with the configuration included in the filter unit (2030) shown in FIG. 20.
[0277] The guide picture is input into an edge classifier (2110), and the class of the processing block to which the sample belongs can be determined through Laplacian-based gradient information. Based on the class information and encoding setting information (e.g., frame type, quantization parameter, distance to reference frame, etc.), a multi-channel kernel and an estimated error can be selected and used for filtering.
[0278] Specifically, the edge classifier (2110) can classify the class of the current block based on the guide picture. The edge classifier (2110) can determine the class index of the current block based on the guided reconstructed sample. The guide picture represents a picture that serves as a reference for analysis for optimal correction of the current sample. The guide picture may be a reconstructed picture (or a decoded picture). The guide picture may be referred to as a reconstructed picture, a decoded picture, or a reference picture. As an example, the guide picture may be a reconstructed picture to which a deblocking filter has been applied, or a reconstructed picture before the deblocking filter has been applied. As an example, the edge classifier (2110) can classify the edge (or edge class) of the current block based on the guided reconstructed sample.
[0279] In one embodiment, the guide picture may include a current block extracted from the restored picture and a restored sample belonging to the surrounding area of the current block. Additionally, as an example, the guide picture may include an area obtained through preprocessing of the restored picture.
[0280] In one embodiment, the edge classifier (2110) can determine the class index of the current block using gradient information. The edge classifier (2110) can determine the class of the current block based on a Laplacian. The edge classifier (2110) can transmit the determined class index to the multi-channel filter unit (2120).
[0281] In one embodiment, edge classification may be performed in units of processing blocks of a predetermined size. The predetermined size may be 2x2, 4x4, or 8x8. Alternatively, edge classification may be performed in units of pixels (i.e., units of samples). When performed in units of blocks, samples within the processing blocks may share a class index.
[0282] Additionally, in one embodiment, the edge classifier (2110) can determine the class of the current block based on the amount of change of each sample value within the current block. The class index of the current block can be determined based on the amount of change of the sample values of the samples within the current block. The amount of change of the sample value can be determined (or calculated) based on the sample values of surrounding samples located in a predetermined direction with respect to the sample. A method for class classification based on the amount of change will be described in detail later with reference to FIG. 22.
[0283] The multi-channel filter unit (2120) can obtain a feature vector for each sample within the current block by applying a multi-channel kernel on a sample-by-sample basis. The multi-channel kernel is a set of filter kernels designed to multidimensionally extract local characteristics of the filtering target samples, and may include a plurality of predefined filter kernels.
[0284] In one embodiment, the multi-channel filter unit (2120) can apply a multi-channel kernel to the current sample to extract features for the current sample. The filter coefficients of the filter kernel can be applied to the current sample or to surrounding samples of the current sample. A feature vector can be generated through the combination of features extracted by each filter kernel within the multi-channel kernel. The feature extraction method will be described in detail later with reference to FIGS. 23 to 25.
[0285] In one embodiment, the multi-channel kernel applied to the current sample may be obtained from a multi-channel kernel set (2150) based on class index and / or encoding information. As an example, the multi-channel kernel set (2150) is determined according to various encoding information, and a multi-channel kernel corresponding to a class index may be selected from the determined multi-channel kernel set (2150).
[0286] In one embodiment, various encoding information for determining a multi-channel kernel set (2150) may be predefined. For example, the encoding information may include a joint table, a kernel index, a picture type, quantization parameters, distance to a reference frame, etc. The multi-channel kernel set (2150) may be implemented as a configuration included in the memory of a filtering device (2000). As an example, the multi-channel kernel set (2150) may be a pre-determined data set. As an example, the multi-channel kernel set (2150) may be configured in a lookup table manner.
[0287] Additionally, the multi-channel kernel set (2150) may include multiple sets, and among the multiple sets, the set used for the current block may be determined explicitly or implicitly. If determined explicitly, set-specific information (e.g., set index) may be signaled via a bitstream. If determined implicitly, as described above, the set used for the block may be determined based on various predefined encoding information.
[0288] The quantization unit (2130) can perform quantization on the feature vector extracted by the multi-channel filter unit (2120). The sample correction unit (2140) can convert the feature vector, which has undergone the quantization process by the quantization unit (2130), into an index suitable for table lookup.
[0289] The sample correction unit (2140) can correct the current sample using the expected error obtained from the expected error set (2160). As an example, the sample correction unit (2140) can generate a filtered current sample by adding the obtained expected error to the current sample. Alternatively, as an example, a scale factor may be used to correct the current sample. The expected error may be adaptively adjusted by the scale factor. The scale factor may be derived according to predefined encoding information, or information indicating the scale factor may be signaled through a bitstream.
[0290] In one embodiment, the expected error applied to the current sample may be obtained from an expected error set (2160) based on a feature vector and / or encoding information. As an example, the expected error set (2160) is determined according to various encoding information, and within the determined expected error set (2160), an expected error specified by a feature vector may be selected.
[0291] In one embodiment, various encoding information for determining the expected error set (2160) may be predefined. For example, the encoding information may include a joint table, a kernel index, a picture type, quantization parameters, distance to a reference frame, etc. The expected error set (2160) may be implemented as a configuration included in the memory of the filtering device (2000). As an example, the expected error set (2160) may be a predetermined data set. As an example, the expected error set (2160) may be configured in a lookup table manner.
[0292] In one embodiment, the expected error set (2160) may include a plurality of sets, and among the plurality of sets, the set used in the current block may be determined explicitly or implicitly. If determined explicitly, set-specific information (e.g., set index) may be signaled via a bitstream. If determined implicitly, as described above, the set used in the block may be determined based on various predefined encoding information.
[0293] Additionally, in one embodiment, a feature vector extracted from the current sample can be converted into an index suitable for table lookup. The filtering device (2000) can reference the expected error of the current sample within the expected error set (2160) using the index obtained from the feature vector.
[0294] FIG. 22 is a drawing for explaining an edge classification process according to one embodiment of the present disclosure.
[0295] According to one embodiment of the present disclosure, a filtering device (2000) can determine the class of the current block based on the amount of change of each sample value within the current block included in the restored image. The class index of the current block can be determined based on the amount of change of the sample values of the samples within the current block. The amount of change of the sample values can be determined based on the sample values of surrounding samples located in a predetermined direction with respect to the sample. As an example, the edge classification process according to the present embodiment can be performed by an edge classifier (2110) described above in FIG. 21.
[0296] In one embodiment, the filtering device (2000) can determine the class index of the current block using gradient information. As an example, the filtering device (2000) can determine the class of the current block based on a Laplacian.
[0297] In one embodiment, edge classification may be performed in units of processing blocks of a predetermined size. The predetermined size may be 2x2, 4x4, or 8x8. Alternatively, edge classification may be performed in units of pixels (i.e., units of samples). When performed in units of blocks, samples within the processing blocks may share a class index.
[0298] In one embodiment, the class index can be determined according to the following mathematical formula 1.
[0299]
[0300] In mathematical equation 1, gradient vertical represents the change in the vertical direction, gradienthorizontal represents the change in the horizontal direction, and gradient diagonal represents the diagonal change, and gradientanti-diagonal represents the counter-diagonal change. The diagonal direction can represent the top-left to bottom-right diagonal direction. The counter-diagonal direction can represent the top-right to bottom-left diagonal direction.
[0301] When edge classification is performed in units of processing blocks of a predetermined size, the amount of change in each direction of Equation 1 can be calculated by averaging the amounts of change of all samples within the processing block. Alternatively, the amount of change in each direction of Equation 1 can be calculated by summing the amounts of change of all samples within the processing block. The amount of change in each direction for the current sample can be determined based on the sample values of adjacent samples determined according to the current sample and each direction.
[0302] For example, if edge classification is performed in 2x2 block units, the four directional changes can be determined by averaging (or summing) the four directional changes for each of the four samples within the current block. The change for the current sample can be determined using the sample values of adjacent samples determined by the current sample and its corresponding direction. The number of adjacent samples can be predefined with various values. For example, the number of adjacent samples can be defined as 1, 2, 3, or 4. When the number of adjacent samples is 2, the vertical change for the current sample can be calculated based on the difference between the current sample and the upper sample, and the difference between the current sample and the lower sample.
[0303] In one embodiment, the class of the current block can be classified into a total of four classes according to Equation 1 below.
[0304] The first class represents a class where the class index value is 0. The first class may correspond to cases where the vertical change amount is greater than the horizontal change amount, and the diagonal change amount is greater than the counter-diagonal change amount. A pattern in which top-left to bottom-right diagonal edges and vertical edges are mixed may be classified as the first class.
[0305] Class 2 represents a class with a class index value of 1. Class 2 corresponds to cases where the amount of change in the horizontal direction is greater than the amount of change in the vertical direction, and the amount of change in the diagonal direction is greater than the amount of change in the opposite diagonal direction. A pattern in which top-left to bottom-right diagonal edges and horizontal edges are mixed can be classified as Class 2.
[0306] The third class represents a class with a class index value of 2. The third class corresponds to cases where the vertical change is greater than the horizontal change and the opposite diagonal change is greater than the diagonal change. A pattern in which the top-right to bottom-left opposite diagonal edge and the vertical edge are mixed can be classified as the third class.
[0307] Class 4 represents a class with a class index value of 3. Class 4 corresponds to cases where the horizontal change amount is greater than the vertical change amount, and the opposite diagonal change amount is greater than the diagonal change amount. A pattern in which upper-right to lower-left opposite diagonal edges and horizontal edges are mixed can be classified as Class 4.
[0308] Each class has a different edge orientation as illustrated in FIG. 22 and can be composed of a combination of two main edge orientations. Through this classification, a multi-channel kernel and an expected error table optimized for the characteristics of each pixel region can be selected, thereby allowing for more precise filtering performance.
[0309] Meanwhile, according to one embodiment of the present disclosure, a filtering device (2000) may apply a multi-channel kernel to multidimensionally extract local characteristics of a sample to be filtered. The filtering device (2000) may extract features by applying each filter kernel within the multi-channel kernel and generate a feature vector by combining the extracted features. In the present disclosure, the feature vector is a vector obtained by combining the extracted features, and its length may be the number of features obtained using the multi-channel kernel.
[0310] In one embodiment of the present disclosure, a multi-channel kernel may include a vertical filter kernel for extracting vertical features, a horizontal filter kernel for extracting horizontal features, and a combined filter kernel for extracting combined features. The vertical filter kernel, the horizontal filter kernel, and the combined filter kernel may be collectively referred to as spatial filter kernels. Each filter kernel will be described with reference to FIGS. 23 through 25.
[0311] FIG. 23 is a drawing illustrating an example of a vertical kernel for extracting vertical features according to one embodiment of the present disclosure.
[0312] Referring to FIG. 23, a filtering device (2000) may apply a vertical filter kernel (or vertical kernel) (2320) as shown in FIG. 23 to the current sample (2310) to extract vertical features of the current sample (2310). In the present disclosure, a set of locations of samples to which filter coefficients are applied may be referred to as a filtering support, and a sample to which filter coefficients are applied may be referred to as a sample support. As an example, the vertical filter kernel (2320) shown in FIG. 23 may be a filtering support of the vertical kernel.
[0313] In one embodiment, during the multi-channel kernel application process, a spatial surrounding area based on the current sample (2310) may be established. To extract the vertical features of the current sample (2310), a vertical filter kernel (2320) may be applied to the current sample (2310) and / or surrounding samples (i.e., filtering supports) of the current sample (2310). As an example, the filter coefficients of the vertical filter kernel (2320) may be applied to surrounding samples (i.e., sample supports) at locations assigned index values of 0 to 11 in FIG. 23.
[0314] In one embodiment, the filter coefficients of the vertical filter kernel (2320) may be applied directly to a reconstructed sample at a corresponding location within the reconstructed image. The sample to which the filter coefficients of the vertical filter kernel (2320) are applied may be a guide sample at a corresponding location within the guide picture. Alternatively, in one embodiment, the filter coefficients of the vertical filter kernel (2320) may be applied to the difference between the current sample (2310) and a reference sample (or reconstructed sample) at a corresponding location. The embodiments of the present disclosure are described based on the latter embodiment (i.e., the embodiment in which filter coefficients are applied to the difference), but the present disclosure is not limited thereto. The following description may be substantially applicable to the former embodiment as well.
[0315] The filtering device (2000) may first perform preprocessing on samples to which the filter coefficients of the vertical filter kernel (2320) are applied. The preprocessing may include vectorization of the samples to which the filter coefficients are applied. Through vectorization, a vector (or array) of samples at the locations where the filter coefficients are applied may be obtained.
[0316] In the preprocessing process, the filtering device (2000) can calculate the difference between the reference sample at each location and the current sample (2310). The calculated difference can be normalized according to the bit depth. And, the calculated difference can be limited to a predefined clipping value. In other words, the calculated difference can be output as a value between the upper and lower limits of the clipping function. Through this, the negative impact of outliers on feature extraction can be reduced.
[0317] The filtering device (2000) can apply filter coefficients to the preprocessed difference at each location. This step may represent a filtering step that applies filter coefficients after preprocessing. The filtering device (2000) can generate vertical features by multiplying the difference by weights (i.e., filter coefficients) and adding a bias (or offset). The filtering device (2000) can obtain vertical features by accumulating the values obtained by applying filter coefficients to the preprocessed difference.
[0318] In one embodiment, in the filtering step, filtering using a symmetric kernel may be performed. The filter coefficients of the vertical filter kernel (2320) may be symmetric with respect to a central vertical line. The filtering support (2320) of the vertical filter kernel may be symmetric with respect to a central vertical line. As an example, the filtering support (2320) of the vertical filter kernel may be symmetric with respect to a central vertical line and may have more sample supports in the vertical line direction than in the horizontal line direction.
[0319] By using a symmetric kernel, parallel processing is possible, and computational complexity can be reduced by half. Additionally, the vertical filter kernel (2320) can have symmetry with the horizontal filter kernel, which can contribute to improving filtering performance while reducing memory burden.
[0320] The filtering device (2000) can perform quantization on the acquired vertical features. Specifically, in the quantization step, the filtering device (2000) can convert the feature values into an index range suitable for table lookup based on at least one method of scaling, shifting, or clipping.
[0321] That is, sample correction values for filtering can be predefined, and an index value can be assigned to each sample correction value. To obtain sample correction values mapped to indices from a predefined dataset, vertical features can be quantized into an index range.
[0322] In one embodiment, the vertical filter kernel (2320) may be composed of a linear kernel. The linear kernel may be self-symmetric or symmetric with respect to other kernels to enable parallel processing. In particular, the amount of computation can be effectively reduced through symmetry between the vertical filter kernel and the horizontal filter kernel, thereby providing performance improvement in real-time video processing.
[0323] FIG. 24 is a drawing illustrating an example of a horizontal kernel for extracting horizontal features according to one embodiment of the present disclosure.
[0324] Referring to FIG. 24, the filtering device (2000) may apply a horizontal filter kernel (or horizontal kernel) (2420) as shown in FIG. 24 to the current sample (2410) to extract horizontal features of the current sample (2410). In the present disclosure, the set of locations of samples to which filter coefficients are applied may be referred to as filtering support, and the samples to which filter coefficients are applied may be referred to as sample support. As an example, the horizontal filter kernel (2420) shown in FIG. 24 may be a filtering support of the horizontal kernel.
[0325] In one embodiment, during the multi-channel kernel application process, a spatial surrounding area based on the current sample (2410) may be established. To extract the horizontal features of the current sample (2410), a horizontal filter kernel (2420) may be applied to the current sample (2410) and / or surrounding samples (i.e., filtering supports) of the current sample (2410). As an example, the filter coefficients of the horizontal filter kernel (2420) may be applied to surrounding samples (i.e., sample supports) at the location assigned index values 12 to 23 in FIG. 24.
[0326] In one embodiment, the filter coefficients of the horizontal filter kernel (2420) may be applied directly to a reconstructed sample at a corresponding location within the reconstructed image. The sample to which the filter coefficients of the horizontal filter kernel (2420) are applied may be a guide sample at a corresponding location within the guide picture. Alternatively, in one embodiment, the filter coefficients of the horizontal filter kernel (2420) may be applied to the difference between the current sample (2410) and a reference sample (or reconstructed sample) at a corresponding location. The embodiments of the present disclosure are described based on the latter embodiment (i.e., the embodiment in which filter coefficients are applied to the difference), but the present disclosure is not limited thereto. The following description may be substantially applicable to the former embodiment as well.
[0327] The filtering device (2000) may first perform preprocessing on samples to which the filter coefficients of the horizontal filter kernel (2420) are applied. The preprocessing may include vectorization of the samples to which the filter coefficients are applied. Through vectorization, a vector (or array) of samples at the locations where the filter coefficients are applied may be obtained.
[0328] In the preprocessing process, the filtering device (2000) can calculate the difference between the reference sample at each location and the current sample (2410). The calculated difference can be normalized according to the bit depth. And, the calculated difference can be limited to a predefined clipping value. In other words, the calculated difference can be output as a value between the upper and lower limits of the clipping function. Through this, the negative impact of outliers on feature extraction can be reduced.
[0329] The filtering device (2000) can apply filter coefficients to the preprocessed difference at each location. This step may represent a filtering step that applies filter coefficients after preprocessing. The filtering device (2000) can generate horizontal features by multiplying the difference by weights (i.e., filter coefficients) and adding a bias (or offset). The filtering device (2000) can obtain horizontal features by accumulating the values obtained by applying filter coefficients to the preprocessed difference.
[0330] In one embodiment, in the filtering step, filtering using a symmetric kernel may be performed. The filter coefficients of the horizontal filter kernel (2420) may be symmetric with respect to a central horizontal line. The filtering support (2420) of the horizontal filter kernel may be symmetric with respect to a central horizontal line. As an example, the filtering support (2420) of the horizontal filter kernel may be symmetric with respect to a central horizontal line and may have more sample supports in the horizontal line direction than in the vertical line direction.
[0331] By using a symmetric kernel, parallel processing is possible, and computational complexity can be reduced by half. Additionally, the horizontal filter kernel (2420) can have symmetry with the vertical filter kernel (2320), which can contribute to improving filtering performance while reducing memory burden.
[0332] The filtering device (2000) can perform quantization on the acquired horizontal features. Specifically, in the quantization step, the filtering device (2000) can convert the feature values into an index range suitable for table lookup based on at least one of scaling, shifting, or clipping.
[0333] That is, sample correction values for filtering can be predefined, and an index value can be assigned to each sample correction value. To obtain sample correction values mapped to indices from a predefined dataset, horizontal features can be quantized into an index range.
[0334] In one embodiment, the horizontal filter kernel (2420) may be composed of a linear kernel. The linear kernel may be self-symmetric or symmetric with respect to other kernels to enable parallel processing. In particular, the amount of computation can be effectively reduced through symmetry between the horizontal filter kernel and the vertical filter kernel, thereby providing performance improvement in real-time video processing.
[0335] FIG. 25 is a drawing illustrating an example of a mixing kernel for extracting mixed features according to one embodiment of the present disclosure.
[0336] Referring to FIG. 25, the filtering device (2000) may apply a mixed filter kernel (or mixed kernel) (2520) as shown in FIG. 25 to the current sample (2510) to extract a mixed feature of the current sample (2510). In this disclosure, the mixed feature may be referred to as a combined feature. Compared to the vertical and horizontal features described above in FIG. 23 and 24, the mixed feature in this embodiment may be understood as a comprehensive feature that takes detail into account regardless of a specific direction. In this disclosure, the set of locations of samples to which filter coefficients are applied may be referred to as a filtering support, and the sample to which filter coefficients are applied may be referred to as a sample support. As an example, the mixed filter kernel (2520) shown in FIG. 25 may be a filtering support of the mixed kernel.
[0337] In one embodiment, during the multi-channel kernel application process, a spatial surrounding area based on the current sample (2510) may be established. To extract the mixed features of the current sample (2510), a mixed filter kernel (2520) may be applied to the current sample (2510) and / or surrounding samples (i.e., filtering supports) of the current sample (2510). As an example, the filter coefficients of the mixed filter kernel (2520) may be applied to surrounding samples (i.e., sample supports) at locations assigned index values 24 to 29 in FIG. 25.
[0338] In one embodiment, the filter coefficients of the blending filter kernel (2520) may be applied directly to a reconstructed sample at a corresponding location within the reconstructed image. The sample to which the filter coefficients of the blending filter kernel (2520) are applied may be a guide sample at a corresponding location within the guide picture. Alternatively, in one embodiment, the filter coefficients of the blending filter kernel (2520) may be applied to the difference between the current sample (2510) and a reference sample (or reconstructed sample) at a corresponding location. The embodiments of the present disclosure are described based on the latter embodiment (i.e., the embodiment in which filter coefficients are applied to the difference), but the present disclosure is not limited thereto. The following description may be substantially applicable to the former embodiment as well.
[0339] The filtering device (2000) may first perform preprocessing on samples to which the filter coefficients of the mixed filter kernel (2520) are applied. The preprocessing may include vectorization of the samples to which the filter coefficients are applied. Through vectorization, a vector (or array) consisting of samples at the locations where the filter coefficients are applied may be obtained.
[0340] In the preprocessing process, the filtering device (2000) can calculate the difference between the reference sample at each location and the current sample (2510). The calculated difference can be normalized according to the bit depth. And, the calculated difference can be limited to a predefined clipping value. In other words, the calculated difference can be output as a value between the upper and lower limits of the clipping function. Through this, the negative impact of outliers on feature extraction can be reduced.
[0341] The filtering device (2000) can apply filter coefficients to the preprocessed difference at each location. This step may represent a filtering step that applies filter coefficients after preprocessing. The filtering device (2000) can generate a mixed feature by multiplying the difference by a weight (i.e., filter coefficient) and adding a bias (or offset). The filtering device (2000) can obtain a mixed feature by accumulating the values obtained by applying filter coefficients to the preprocessed difference.
[0342] In one embodiment, in the filtering step, filtering using a symmetric kernel may be performed. The filter coefficients of the mixed filter kernel (2520) may be symmetric with respect to a center vertical line and a center horizontal line. The filtering support (2520) of the mixed filter kernel may be symmetric with respect to a center vertical line and a center horizontal line.
[0343] By using a symmetric kernel, parallel processing is possible, and computational complexity can be reduced by half. In addition, the mixed filter kernel (2520) can contribute to improving filtering performance while reducing memory burden because it has self-symmetry.
[0344] The filtering device (2000) can perform quantization on the acquired mixed features. Specifically, in the quantization step, the filtering device (2000) can convert the feature values into an index range suitable for table lookup based on at least one of scaling, shifting, or clipping.
[0345] That is, sample correction values for filtering can be predefined, and an index value can be assigned to each sample correction value. To obtain sample correction values mapped to indices from a predefined dataset, mixed features can be quantized into an index range.
[0346] In one embodiment, the mixed filter kernel (2520) may be composed of a linear kernel. The linear kernel may be self-symmetric or symmetric with respect to other kernels to enable parallel processing. In particular, the self-symmetric nature of the mixed filter kernel (2520) can effectively reduce the amount of computation, thereby providing performance improvement in real-time video processing.
[0347] In one embodiment, when acquiring a mixed feature, a change amount feature may be considered. For example, the change amount values in the vertical, horizontal, diagonal, and counter-diagonal directions of the current sample may be used when acquiring the mixed feature. Alternatively, for example, the class index of the current sample (or the current block including the current sample) may be determined based on the change amount for each direction. At this time, a mixed filter kernel (2520) applied to the current sample among a plurality of mixed filter kernels (2520) may be determined according to the class index.
[0348] The filtering device (2000) can obtain a feature vector composed of vertical, horizontal, and mixed features by applying the multi-channel kernel described above in FIGS. 23 to 25. The multi-channel kernel described above in FIGS. 23 to 25 is a symmetric spatial multi-channel kernel, which is applied to a predetermined number of surrounding samples and may include corresponding clipping and bias values. The symmetric kernel can help reduce the number of multiplication operations required for spatial feature extraction by half.
[0349] The feature generation process may include generating a feature vector of length K that characterizes the surrounding region of the current sample. The feature vector can be obtained through a multi-channel filtering process using a multi-channel kernel. The obtained feature vector can be used as an index.
[0350] The filtering device (2000) can obtain an expected error mapped by an index from a predefined data set. As an example, the expected error can be determined by the following mathematical formula 2.
[0351]
[0352] In mathematical equation 2, d i,0 to d i,K-1 is the current filtering target sample p i As features obtained by applying a multi-channel kernel to, p in the expected error table i It represents an index for querying the expected error applied to. According to one embodiment of the present disclosure, vertical, horizontal, and mixed features can be obtained using a multi-channel kernel. In this case, K may be 3. Additionally, each feature may be a quantized value for index-based table querying.
[0353] In one embodiment, the estimated error obtained by index mapping may be adjusted based on a scale factor. This may be an estimated error optimized in terms of rate-distortion. The estimated error may be adjusted according to the following Equation 3.
[0354]
[0355] In Equation 3, A can be defined as a value dependent on the maximum value of the scale factor. As an example, A can be 14. In one embodiment, the encoding device can measure the difference between the expected error and the actual error and signal this to the decoder via the scale factor. As an example, for efficient signaling, the scale factor can be selected from a predefined set for the encoding device and the decoder. For example, the predefined set can be {1, 2, 3, 4}.
[0356] The filtering device (2000) can combine the restored sample and the calculated expected error to generate a finally corrected sample (i.e., a GDF filtered sample). At this time, the following mathematical formula 4 may be used.
[0357]
[0358] Referring to mathematical formula 4, represents the filtered sample, and p i represents the current sample to be filtered. That is, the filtered sample can be obtained by subtracting the expected error derived from the current sample to be filtered. At this time, the filtered result value can be output between 0 and (1≪bitDepth)-1 through a clipping function.
[0359] In the foregoing, the multi-channel kernel has been described primarily in cases where it includes only the spatial kernels described in FIGS. 23 to 25, but the present disclosure is not limited thereto. As an example, the multi-channel kernel may be composed of a combination of the spatial kernels and gradient kernels described in FIGS. 23 to 25.
[0360] FIG. 26 is a drawing illustrating an example of a spatial kernel for extracting spatial features according to one embodiment of the present disclosure.
[0361] Referring to FIG. 26, the filtering device (2000) may apply a spatial kernel (2620) (or spatial filter kernel) as shown in FIG. 26 to the current sample (2610) to extract spatial features of the current sample (2610). Spatial features may include vertical features, horizontal features, and mixed features as described above in FIG. 23 through 25.
[0362] According to one embodiment, unlike the plurality of spatial kernels described in FIGS. 23 to 25, a single spatial kernel (2620) as shown in FIG. 26 may be defined. During the application of a multi-channel kernel, a spatial peripheral region (2620) based on the current sample (2610) may be set.
[0363] A filtering device (2000) may apply a spatial kernel (2620) to the current sample (2610) and / or surrounding samples of the current sample (2610) to extract spatial features of the current sample (2610). As an example, in FIG. 26, filter coefficients of the spatial kernel (2620) may be applied to surrounding samples at locations assigned index values of 0 to 35.
[0364] In one embodiment, the filter coefficients of the spatial kernel (2620) may be applied directly to a reconstructed sample at a corresponding location within the reconstructed image. The sample to which the filter coefficients of the spatial kernel (2620) are applied may be a guide sample at a corresponding location within the guide picture. Alternatively, in one embodiment, the filter coefficients of the spatial kernel (2620) may be applied to the difference between the current sample (2610) and a reference sample (or reconstructed sample) at a corresponding location. The embodiments of the present disclosure are described based on the latter embodiment (i.e., the embodiment in which the filter coefficients are applied to the difference), but the present disclosure is not limited thereto. The following description may be substantially applicable to the former embodiment as well.
[0365] The filtering device (2000) may first perform preprocessing on samples to which the filter coefficients of the spatial kernel (2620) are applied. The preprocessing may include vectorization of the samples to which the filter coefficients are applied. Through vectorization, a vector (or array) consisting of samples at the locations where the filter coefficients are applied may be obtained.
[0366] In the preprocessing process, the filtering device (2000) can calculate the difference between the reference sample at each location and the current sample (2610). The calculated difference can be normalized according to the bit depth. And, the calculated difference can be limited to a predefined clipping value. In other words, the calculated difference can be output as a value between the upper and lower limits of the clipping function. Through this, the negative impact of outliers on feature extraction can be reduced.
[0367] The filtering device (2000) can apply filter coefficients to the preprocessed difference at each location. This step may represent a filtering step that applies filter coefficients after preprocessing. The filtering device (2000) can generate mixed features by multiplying the difference by a weight (i.e., filter coefficient) and adding a bias (or filtering bias, offset). The filtering device (2000) can obtain mixed features by accumulating the values obtained by applying filter coefficients to the preprocessed difference.
[0368] In one embodiment, in the filtering step, filtering using a symmetric kernel may be performed. The filter coefficients of the spatial kernel (2620) may be symmetric with respect to the center vertical and horizontal lines. By using a symmetric kernel, parallel processing is possible, and computational complexity can be reduced by half.
[0369] The filtering device (2000) can perform quantization on the acquired spatial features. Specifically, in the quantization step, the filtering device (2000) can convert the feature values into an index range suitable for table lookup based on at least one method of scaling, shifting, or clipping.
[0370] That is, sample correction values for filtering can be predefined, and an index value can be assigned to each sample correction value. To obtain sample correction values mapped to indices from a predefined dataset, spatial features can be quantized into an index range.
[0371] In one embodiment, when acquiring spatial features, change amount features may be considered. For example, change amount values in the vertical, horizontal, diagonal, and counter-diagonal directions of the current sample may be used when acquiring spatial features. Alternatively, for example, the class index of the current sample (or the current block including the current sample) may be determined based on the change amount for each direction. At this time, the spatial kernel (2620) applied to the current sample among a plurality of spatial kernels (2620) may be determined according to the class index.
[0372] Meanwhile, in one embodiment, the GDF according to the present disclosure may be signaled on / off at the picture (or frame) level. If the GDF is enabled for the current picture, an index for identifying a multi-channel kernel within a multi-channel kernel set may be signaled. As an example, 2 bits may be assigned to the index of the multi-channel kernel. If the GDF is enabled for the current picture, an index for identifying a scale factor may be signaled. As an example, 2 bits may be assigned to the index of the scale factor.
[0373] Additionally, if the GDF is enabled for the current picture, whether to signal on / off for the GDF at the super block level may be signaled. If super block signaling is enabled, an on / off flag may be signaled for each super block using a single binary context. In this case, flag signaling for the super block may be performed in raster scan order. In the present disclosure, a super block refers to a higher-level block containing a plurality of coding blocks as a basic processing unit used in video coding. As an example, a super block may be defined as a block of size 128x128 or 64x64. For example, a super block may be a coding tree unit (CTU) or a coding tree block (CTB).
[0374] In one embodiment, the GDF may be performed based on guiding information. In the present disclosure, the guiding information may include at least one of a multi-channel kernel (or set of multi-channel kernels) or an expected error table. As an example, the guiding information including the multi-channel kernel and / or expected error table may be selected according to the following criteria. The guiding information may be generated from a guided recovery frame.
[0375] For example, in the case of intra mode, guiding information may be selected based on at least one of a model index, frame type, quantization parameter, or class index signaled from the encoder. In the case of inter mode, guiding information may be selected based on at least one of a model index, frame type, quantization parameter, class index, or distance to a reference frame signaled from the encoder.
[0376] Additionally, in one embodiment of the present disclosure, constraints may be applied to spatial feature calculations to reduce the number of reference lines for samples around a superblock. Such boundary processing can improve memory access efficiency and reduce the complexity of the hardware implementation.
[0377] For samples near the top boundary of the super block, for example, if the nth reference sample is outside three reference lines (e.g., the reference sample assigned indices 0 to 2 in FIG. 26), that reference sample can be replaced with the corresponding (Nn-1)th sample. This allows memory access to the reference sample away from the super block to be avoided.
[0378] For samples near the bottom boundary of the super block, for example, if the nth reference sample goes beyond three reference lines (e.g., the reference sample assigned indices 33–35 in Fig. 26), that reference sample can be replaced with the corresponding (Nn-1)th sample. This can resolve memory access constraints at the bottom boundary using the same principle as the top boundary.
[0379] Here, N represents the total number of reference samples, and in one embodiment according to FIG. 26, N can be set to 36. The selection of replacement samples utilizes spatially adjacent samples while maintaining a symmetrical structure, thereby minimizing the degradation of feature extraction quality. Additionally, by replacing samples within a limited reference line, filtering performance can be maintained while reducing memory bandwidth requirements.
[0380] FIG. 27 is a drawing illustrating the arrangement of guide detail filters in an in-loop filter pipeline according to one embodiment of the present disclosure.
[0381] FIG. 27 illustrates the location and role of the GDF according to an embodiment of the present disclosure within the overall in-loop filtering structure of the AVM video codec.
[0382] Referring to FIG. 27, the in-loop filter pipeline may consist of a plurality of filters sequentially arranged after a deblocking filter (2710). The deblocking filter (2710) may have a filter length and strength adapted to the coding setting to eliminate perceptually unpleasant discontinuities along the block boundary.
[0383] According to one embodiment, the GDF (2720) may be placed immediately after the deblocking filter (2710) to improve the local detail fidelity of the restored frame. The GDF (2720) may be placed in a position that can potentially reduce the signaling overhead required by other in-loop filters, such as the Constrained Directional Enhancement Filter (CDEF) (2730), Cross-Component Sample Offset (CCSO) (2740), and Loop Restoration (LR) (2750).
[0384] CDEF (2730) may be a nonlinear low-pass filter designed to reduce ringing artifacts. CDEF (2730) may identify the direction of edges in 8×8 blocks and perform adaptive filtering along the identified direction. The filter may consist of a first-order tap and a second-order tap. The first-order tap may be placed along the identified direction, and the second-order tap may be placed in a cross shape rotated 45 degrees. The filter strength may be explicitly signaled. This allows for precise control over blurring and preserves image details while removing coding artifacts.
[0385] CCSO (2740) may be a non-multiplication non-linear mapping process that generates correction signals for luminance and chroma reconstructed samples using luminance samples at the same location and adjacent to each other. CCSO (2740) is implemented using a lookup table, where the input is a group of reconstructed luminance samples and the output is an offset value applied to the center luminance or chroma samples at the same location. CCSO (2740) classifies samples using an edge offset classifier and a band offset classifier, and can obtain appropriate offset values from the lookup table through the classified class index.
[0386] LR (2750) may be a set of several switchable filters placed at the end of the in-loop pipeline. LR (2750) may be based on the Wiener filter concept in a manner similar to the adaptive loop filter of VVC. LR (2750) may include non-separable Wiener filters, pixel classification-based non-separable filters, self-guided filters, etc. For luminance, a diamond-shaped symmetric non-separable Wiener filter may be used. For chroma, a method combining equi-component filtering and cross-component filtering may be applied. Through a flexible signaling mechanism at the reconstruction unit level, the optimal combination among various reconstruction tools can be selected, and efficient sharing of filter coefficients may be possible through reconstruction unit merging and bank functions.
[0387] FIG. 28 is a drawing illustrating the arrangement of guide detail filters in an in-loop filter pipeline according to one embodiment of the present disclosure.
[0388] FIG. 28 illustrates the location and role of the GDF according to an embodiment of the present disclosure within the overall in-loop filtering structure of the AVM video codec.
[0389] Referring to FIG. 28, CDEF (2820) and / or CCSO (2830) may be applied to the image to which the deblocking filter (2810) has been applied after the deblocking filter (2810). Subsequently, GDF (2840) may be placed in parallel with LR (2850) and applied together with LR (2850) or applied independently.
[0390] In one embodiment, the filtering device (2000) can generate guiding information using a sample in an image to which CDEF (2820) and / or CCSO (2830) is applied. The filtering device (2000) can obtain an expected error based on the guiding information and obtain a filtered sample by applying the obtained expected error to a sample in an image to which LR (2850) is applied.
[0391] The parallel structure illustrated in FIG. 28 allows CDEF (2820) and CCSO (2830) to independently process different types of artifacts, and the results of each processing can be simultaneously input to subsequent filters, LR (2850) and GDF (2840), enabling more effective final filtering.
[0392] FIG. 29 is a drawing illustrating the arrangement of guide detail filters in an in-loop filter pipeline according to one embodiment of the present disclosure.
[0393] FIG. 29 illustrates the location and role of the GDF according to an embodiment of the present disclosure within the overall in-loop filtering structure of the AVM video codec.
[0394] Referring to FIG. 29, CDEF (2920), GDF (2940), and CCSO (2930) are arranged in parallel after the deblocking filter (2910), and finally, LR (2950) can be applied.
[0395] In one embodiment, the filtering device (2000) can generate guiding information using a sample in an image to which a deblocking filter (2910) is applied. The filtering device (2000) can obtain an expected error based on the guiding information and obtain a filtered sample by applying the obtained expected error to a sample in an image to which a CDEF (2920) is applied.
[0396] Directional-based ringing removal is first performed in CDEF (2920), and after detail enhancement is performed in GDF (2940), cross-component offset correction can be applied in CCSO (2930). Finally, overall restoration processing is performed in LR (2950) to produce an optimized result. This method may have the advantage of enabling stepwise optimization by sequentially utilizing the characteristics of each filter.
[0397] FIG. 30 is a flowchart for explaining a filtering method of an image according to one embodiment.
[0398] As described above, the filtering device (2000) may correspond to the loop filtering unit (1940, 1970) illustrated in FIG. 19. In one embodiment, the filtering device (2000) may be included in each of the image decoding device (100) and the image encoding device (200).
[0399] That is, in one embodiment, the filtering method performed by the filtering device (2000) may be included in the image decoding method performed by the image decoding device (100). In other words, the filtering method performed by the filtering device (2000) may be the image decoding method performed by the image decoding device (100). In one embodiment, the filtering method performed by the filtering device (2000) may be included in the image encoding method performed by the image encoding device (200). In other words, the filtering method performed by the filtering device (2000) may be the image encoding method performed by the image encoding device (200).
[0400] Referring to FIG. 30, the filtering device (2000) can determine the class of the current block based on the amount of change in the sample value for each sample within the current block (S3010). An embodiment described above in FIG. 21 and FIG. 22 may be applied, where redundant descriptions related thereto may be omitted.
[0401] As described above, the filtering device (2000) can determine the vertical change amount, horizontal change amount, diagonal change amount, and counter-diagonal change amount of the current block by averaging the change amounts of sample values in the vertical direction, horizontal direction, diagonal direction, and counter-diagonal direction for all samples included in the current block, respectively. The embodiment described above in FIGS. 21 and 22 may be applied, and here, redundant descriptions related thereto may be omitted.
[0402] As described above, the filtering device (2000) can determine the class of the current block using a first comparison result comparing the magnitude of the vertical change amount and the horizontal change amount of the current block, and a second comparison result comparing the magnitude of the diagonal change amount and the opposite diagonal change amount of the current block. An embodiment described in Equation 1 above may be applied, and here, redundant descriptions related thereto may be omitted.
[0403] The filtering device (2000) can determine a multi-channel kernel applied to the current block based on the class of the current block (S3020). The embodiments described above in FIGS. 21, 23 to 26 may be applied, where redundant descriptions related thereto may be omitted.
[0404] As described above, a multi-channel kernel may include a plurality of predefined filter kernels. In one embodiment, the multi-channel kernel may include a vertical filter kernel described in FIG. 23, a horizontal filter kernel described in FIG. 24, and a mixed filter kernel described in FIG. 25.
[0405] The filtering device (2000) can determine a feature vector for a current sample by applying a plurality of filter kernels included in a multi-channel kernel to each current sample within the current block (S3030). An embodiment described above in FIGS. 21, 23 to 26 may be applied, and here, a description that is redundant in this regard may be omitted.
[0406] In one embodiment, the filtering device (2000) can obtain a vertical feature for the current sample by applying a first filter coefficient of a vertical filter kernel to the difference between the current sample and a surrounding sample at a position corresponding to the first filter coefficient.
[0407] In one embodiment, the filtering device (2000) can obtain a horizontal feature for the current sample by applying a second filter coefficient of a horizontal filter kernel to the difference between the current sample and a surrounding sample at a position corresponding to the second filter coefficient.
[0408] In one embodiment, the filtering device (2000) can obtain a mixed feature for the current sample by applying a third filter coefficient of the mixed filter kernel to the difference between the current sample and a surrounding sample at a position corresponding to the third filter coefficient.
[0409] As described above, the first filter coefficient of the vertical filter kernel may be symmetric with respect to the center vertical line. The second filter coefficient of the horizontal filter kernel may be symmetric with respect to the center horizontal line. The third filter coefficient of the mixed filter kernel may be symmetric with respect to the center vertical line and the center horizontal line.
[0410] As described above, the filtering device (2000) can preprocess the difference between the current sample and the surrounding sample at a position corresponding to each filter coefficient of a plurality of filter kernels included in a multi-channel kernel based on a predetermined clipping function.
[0411] As described above, the filtering device (2000) can perform quantization of the vertical features, horizontal features, and mixed features of the current sample.
[0412] The filtering device (2000) can obtain an expected error mapped by a feature vector from a predefined data set (S3040).
[0413] As mentioned above, a predefined dataset may be stored in the form of a lookup table. Feature vectors can be used as indices.
[0414] The filtering device (2000) can filter the current sample using the expected error (S3050).
[0415] As described above, the filtering device (2000) can obtain a scale factor representing the scale of sample correction from the bitstream. At this time, the current sample can be filtered using an estimated error modified based on the scale factor.
[0416] 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 through filtering.
[0417] An image encoding method and apparatus and an image decoding method and apparatus according to one embodiment have the objective of improving coding efficiency by enhancing the preservation of local details of each sample within a restored frame during an in-loop filtering process.
[0418] 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.
[0419] A method for decoding an image according to one embodiment may include a step of determining the class of the current block based on the amount of change in the sample value for each sample within the current block.
[0420] A method for decoding an image according to one embodiment may include the step of determining a multi-channel kernel applied to a current block based on the class of the current block.
[0421] In one embodiment, the multi-channel kernel may include a plurality of predefined filter kernels.
[0422] A decoding method for an image according to one embodiment may include the step of determining a feature vector for a current sample by applying a plurality of filter kernels included in a multi-channel kernel to each current sample within a current block.
[0423] A method for decoding an image according to one embodiment may include the step of obtaining an expected error mapped by a feature vector from a predefined data set.
[0424] A method for decoding an image according to one embodiment may include a step of filtering a current sample using an expected error.
[0425] A decoding method for an image according to one embodiment may include the step of determining the vertical change amount, horizontal change amount, diagonal change amount, and opposite diagonal change amount of the current block by averaging the change amounts of sample values in the vertical direction, horizontal direction, diagonal direction, and opposite diagonal direction for all samples included in the current block, respectively.
[0426] A decoding method for an image according to one embodiment may include a step of determining the class of a current block using a first comparison result in which the magnitudes of the vertical change amount and the horizontal change amount of the current block are compared, and a second comparison result in which the magnitudes of the diagonal change amount and the opposite diagonal change amount of the current block are compared.
[0427] According to one embodiment, the multi-channel kernel may include a vertical filter kernel, a horizontal filter kernel, and a mixed filter kernel.
[0428] A decoding method for an image according to one embodiment may include the step of obtaining a vertical feature for a current sample by applying a first filter coefficient of a vertical filter kernel to the difference between a surrounding sample at a position corresponding to the first filter coefficient and the current sample.
[0429] A decoding method for an image according to one embodiment may include the step of obtaining a horizontal feature for a current sample by applying a second filter coefficient of a horizontal filter kernel to the difference between a surrounding sample at a position corresponding to the second filter coefficient and the current sample.
[0430] A decoding method for an image according to one embodiment may include the step of obtaining a mixed feature for a current sample by applying a third filter coefficient of a mixed filter kernel to the difference between a surrounding sample at a position corresponding to the third filter coefficient and the current sample.
[0431] According to one embodiment, the first filter coefficients of the vertical filter kernel are symmetric with respect to the center vertical line, the second filter coefficients of the horizontal filter kernel are symmetric with respect to the center horizontal line, and the third filter coefficients of the mixed filter kernel may be symmetric with respect to the center vertical line and the center horizontal line.
[0432] According to one embodiment, the filtering support of the vertical filter kernel may be symmetrical with respect to the central vertical line.
[0433] According to one embodiment, the filtering support of the vertical filter kernel is symmetric with respect to the central vertical line and may have more sample supports in the direction of the vertical line than in the horizontal line.
[0434] According to one embodiment, the filtering support of the horizontal filter kernel may be symmetrical with respect to a central horizontal line.
[0435] According to one embodiment, the filtering support of the horizontal filter kernel is symmetric with respect to the center horizontal line and may have more sample supports in the direction of the horizontal line than in the vertical line.
[0436] According to one embodiment, the filtering support of the mixed filter kernel may be symmetrical with respect to a central vertical line and a central horizontal line.
[0437] A decoding method for an image according to one embodiment may include a step of preprocessing the difference between a current sample and a surrounding sample at a position corresponding to each filter coefficient of a plurality of filter kernels included in a multi-channel kernel based on a predetermined clipping function.
[0438] A decoding method for an image according to one embodiment may include the step of performing quantization on vertical features, horizontal features, and mixed features of a current sample.
[0439] A method for decoding an image according to one embodiment may include the step of obtaining a scale factor representing the scale of sample correction.
[0440] According to one embodiment, the current sample can be filtered using an estimated error modified based on a scale factor.
[0441] According to one embodiment, a predefined data set may be stored in the form of a lookup table.
[0442] An image decoding device according to one embodiment may include at least one memory for storing at least one instruction, and at least one processor for operating according to at least one instruction.
[0443] A processor included in an image decoding device according to one embodiment determines the class of the current block based on the amount of change of sample values for each sample in the current block, and determines a multi-channel kernel applied to the current block based on the class of the current block, wherein the multi-channel kernel includes a plurality of predefined filter kernels, and by applying each of the plurality of filter kernels included in the multi-channel kernel to the current sample in the current block, a feature vector for the current sample is determined, an expected error mapped by the feature vector is obtained from a predefined data set, and the current sample can be filtered using the expected error.
[0444] A processor included in an image decoding device according to one embodiment can determine the vertical change amount, horizontal change amount, diagonal change amount, and opposite diagonal change amount of the current block by averaging the change amounts of sample values in the vertical direction, horizontal direction, diagonal direction, and opposite diagonal direction for all samples included in the current block, respectively.
[0445] A processor included in an image decoding device according to one embodiment can determine the class of the current block using a first comparison result that compares the magnitude of the vertical change amount and the horizontal change amount of the current block, and a second comparison result that compares the magnitude of the diagonal change amount and the opposite diagonal change amount of the current block.
[0446] According to one embodiment, the multi-channel kernel may include a vertical filter kernel, a horizontal filter kernel, and a mixed filter kernel.
[0447] A processor included in an image decoding device according to one embodiment can obtain a vertical feature for a current sample by applying a first filter coefficient of a vertical filter kernel to the difference between a surrounding sample at a position corresponding to the first filter coefficient and the current sample.
[0448] A processor included in an image decoding device according to one embodiment can obtain a horizontal feature for a current sample by applying a second filter coefficient of a horizontal filter kernel to the difference between a surrounding sample at a position corresponding to the second filter coefficient and the current sample.
[0449] A processor included in an image decoding device according to one embodiment can obtain a mixed feature for a current sample by applying a third filter coefficient of a mixed filter kernel to the difference between a surrounding sample at a position corresponding to the third filter coefficient and the current sample.
[0450] According to one embodiment, the first filter coefficients of the vertical filter kernel are symmetric with respect to the center vertical line, the second filter coefficients of the horizontal filter kernel are symmetric with respect to the center horizontal line, and the third filter coefficients of the mixed filter kernel may be symmetric with respect to the center vertical line and the center horizontal line.
[0451] According to one embodiment, the filtering support of the vertical filter kernel may be symmetrical with respect to the central vertical line.
[0452] According to one embodiment, the filtering support of the vertical filter kernel is symmetric with respect to the central vertical line and may have more sample supports in the direction of the vertical line than in the horizontal line.
[0453] According to one embodiment, the filtering support of the horizontal filter kernel may be symmetrical with respect to a central horizontal line.
[0454] According to one embodiment, the filtering support of the horizontal filter kernel is symmetric with respect to the center horizontal line and may have more sample supports in the direction of the horizontal line than in the vertical line.
[0455] According to one embodiment, the filtering support of the mixed filter kernel may be symmetrical with respect to a central vertical line and a central horizontal line.
[0456] A processor included in an image decoding device according to one embodiment can preprocess the difference between a current sample and a surrounding sample at a position corresponding to each filter coefficient of a plurality of filter kernels included in a multi-channel kernel based on a predetermined clipping function.
[0457] A processor included in an image decoding device according to one embodiment can perform quantization for vertical features, horizontal features, and mixed features of a current sample.
[0458] A processor included in an image decoding device according to one embodiment can obtain a scale factor representing the scale of sample correction.
[0459] According to one embodiment, the current sample can be filtered using an estimated error modified based on a scale factor.
[0460] According to one embodiment, a predefined data set may be stored in the form of a lookup table.
[0461] An image encoding method according to one embodiment may include a step of determining the class of the current block based on the amount of change in the sample value for each sample within the current block.
[0462] A method for encoding an image according to one embodiment may include the step of determining a multi-channel kernel applied to a current block based on the class of the current block.
[0463] In one embodiment, the multi-channel kernel may include a plurality of predefined filter kernels.
[0464] An image encoding method according to one embodiment may include the step of determining a feature vector for a current sample by applying a plurality of filter kernels included in a multi-channel kernel to each current sample within a current block.
[0465] An image encoding method according to one embodiment may include the step of obtaining an expected error mapped by a feature vector from a predefined data set.
[0466] An image encoding method according to one embodiment may include a step of filtering a current sample using an expected error.
[0467] An image encoding method according to one embodiment may include the step of determining the vertical direction change amount, horizontal direction change amount, diagonal direction change amount, and opposite diagonal direction change amount of the current block by averaging the change amounts of sample values in the vertical direction, horizontal direction, diagonal direction, and opposite diagonal direction for all samples included in the current block, respectively.
[0468] An image encoding method according to one embodiment may include a step of determining the class of a current block using a first comparison result in which the magnitudes of the vertical change amount and the horizontal change amount of the current block are compared, and a second comparison result in which the magnitudes of the diagonal change amount and the opposite diagonal change amount of the current block are compared.
[0469] According to one embodiment, the multi-channel kernel may include a vertical filter kernel, a horizontal filter kernel, and a mixed filter kernel.
[0470] An image encoding method according to one embodiment may include the step of obtaining a vertical feature for a current sample by applying a first filter coefficient of a vertical filter kernel to the difference between a surrounding sample at a position corresponding to the first filter coefficient and the current sample.
[0471] An image encoding method according to one embodiment may include the step of obtaining a horizontal feature for a current sample by applying a second filter coefficient of a horizontal filter kernel to the difference between a surrounding sample at a position corresponding to the second filter coefficient and the current sample.
[0472] An image encoding method according to one embodiment may include the step of obtaining a mixed feature for a current sample by applying a third filter coefficient of a mixed filter kernel to the difference between a surrounding sample at a position corresponding to the third filter coefficient and the current sample.
[0473] According to one embodiment, the first filter coefficients of the vertical filter kernel are symmetric with respect to the center vertical line, the second filter coefficients of the horizontal filter kernel are symmetric with respect to the center horizontal line, and the third filter coefficients of the mixed filter kernel may be symmetric with respect to the center vertical line and the center horizontal line.
[0474] According to one embodiment, the filtering support of the vertical filter kernel may be symmetrical with respect to the central vertical line.
[0475] According to one embodiment, the filtering support of the vertical filter kernel is symmetric with respect to the central vertical line and may have more sample supports in the direction of the vertical line than in the horizontal line.
[0476] According to one embodiment, the filtering support of the horizontal filter kernel may be symmetrical with respect to a central horizontal line.
[0477] According to one embodiment, the filtering support of the horizontal filter kernel is symmetric with respect to the center horizontal line and may have more sample supports in the direction of the horizontal line than in the vertical line.
[0478] According to one embodiment, the filtering support of the mixed filter kernel may be symmetrical with respect to a central vertical line and a central horizontal line.
[0479] An image encoding method according to one embodiment may include a step of preprocessing the difference between a current sample and a surrounding sample at a position corresponding to each filter coefficient of a plurality of filter kernels included in a multi-channel kernel based on a predetermined clipping function.
[0480] An image encoding method according to one embodiment may include the step of performing quantization on vertical features, horizontal features, and mixed features of a current sample.
[0481] An image encoding method according to one embodiment may include the step of obtaining a scale factor representing the scale of sample correction.
[0482] According to one embodiment, the current sample can be filtered using an estimated error modified based on a scale factor.
[0483] According to one embodiment, a predefined data set may be stored in the form of a lookup table.
[0484] An image encoding device according to one embodiment may include at least one memory for storing at least one instruction, and at least one processor for operating according to at least one instruction.
[0485] A processor included in an image encoding device according to one embodiment determines the class of the current block based on the amount of change of sample values for each sample in the current block, and determines a multi-channel kernel applied to the current block based on the class of the current block, wherein the multi-channel kernel includes a plurality of predefined filter kernels, and by applying each of the plurality of filter kernels included in the multi-channel kernel to the current sample in the current block, a feature vector for the current sample is determined, an expected error mapped by the feature vector is obtained from a predefined data set, and the current sample can be filtered using the expected error.
[0486] A processor included in an image encoding device according to one embodiment can determine the vertical change amount, horizontal change amount, diagonal change amount, and anti-diagonal change amount of the current block by averaging the change amounts of sample values in the vertical direction, horizontal direction, diagonal direction, and anti-diagonal direction for all samples included in the current block, respectively.
[0487] A processor included in an image encoding device according to one embodiment can determine the class of a current block using a first comparison result that compares the magnitude of the vertical change amount and the horizontal change amount of the current block, and a second comparison result that compares the magnitude of the diagonal change amount and the opposite diagonal change amount of the current block.
[0488] According to one embodiment, the multi-channel kernel may include a vertical filter kernel, a horizontal filter kernel, and a mixed filter kernel.
[0489] A processor included in an image encoding device according to one embodiment can obtain a vertical feature for a current sample by applying a first filter coefficient of a vertical filter kernel to the difference between a surrounding sample at a position corresponding to the first filter coefficient and the current sample.
[0490] A processor included in an image encoding device according to one embodiment can obtain a horizontal feature for a current sample by applying a second filter coefficient of a horizontal filter kernel to the difference between a surrounding sample at a position corresponding to the second filter coefficient and the current sample.
[0491] A processor included in an image encoding device according to one embodiment can obtain a mixed feature for a current sample by applying a third filter coefficient of a mixed filter kernel to the difference between a surrounding sample at a position corresponding to the third filter coefficient and the current sample.
[0492] According to one embodiment, the first filter coefficients of the vertical filter kernel are symmetric with respect to the center vertical line, the second filter coefficients of the horizontal filter kernel are symmetric with respect to the center horizontal line, and the third filter coefficients of the mixed filter kernel may be symmetric with respect to the center vertical line and the center horizontal line.
[0493] According to one embodiment, the filtering support of the vertical filter kernel may be symmetrical with respect to the central vertical line.
[0494] According to one embodiment, the filtering support of the vertical filter kernel is symmetric with respect to the central vertical line and may have more sample supports in the direction of the vertical line than in the horizontal line.
[0495] According to one embodiment, the filtering support of the horizontal filter kernel may be symmetrical with respect to a central horizontal line.
[0496] According to one embodiment, the filtering support of the horizontal filter kernel is symmetric with respect to the center horizontal line and may have more sample supports in the direction of the horizontal line than in the vertical line.
[0497] According to one embodiment, the filtering support of the mixed filter kernel may be symmetrical with respect to a central vertical line and a central horizontal line.
[0498] A processor included in an image encoding device according to one embodiment can preprocess the difference between a current sample and a surrounding sample at a position corresponding to each filter coefficient of a plurality of filter kernels included in a multi-channel kernel based on a predetermined clipping function.
[0499] A processor included in an image encoding device according to one embodiment can perform quantization of vertical features, horizontal features, and mixed features of a current sample.
[0500] A processor included in an image encoding device according to one embodiment can obtain a scale factor representing the scale of sample correction.
[0501] According to one embodiment, the current sample can be filtered using an estimated error modified based on a scale factor.
[0502] According to one embodiment, a predefined data set may be stored in the form of a lookup table.
[0503] A computer-readable recording medium according to one embodiment may include a bitstream.
[0504] In one embodiment, the bitstream may include filter information used to filter the current image according to the image encoding method.
[0505] In one embodiment, the bitstream may include an encoding result generated based on a current image that is filtered according to an image encoding method.
[0506] An image encoding method and apparatus and an image decoding method and apparatus according to one embodiment can improve the performance of predictive encoding and predictive decoding for a current block through filtering.
[0507] An image encoding method and apparatus and an image decoding method and apparatus according to one embodiment can improve coding efficiency by enhancing the preservation of local details of each sample within a restored frame during an in-loop filtering process.
[0508] The effects obtainable from the present disclosure are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art to which the present disclosure belongs from the description below.
[0509] Meanwhile, the embodiments of the present disclosure described above can be written as a program that can be executed on a computer, and the written program can be stored on a storage medium that can be read by a device.
[0510] 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.
[0511] 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
In a method for decoding an image, A step (S3010) of determining the class of the current block based on the gradient of the sample value for each sample within the current block; A step (S3020) of determining a multi-channel kernel applied to the current block based on the class of the current block, wherein the multi-channel kernel includes a plurality of predefined filter kernels; A step (S3030) of determining a feature vector for a current sample by applying a plurality of filter kernels included in the multi-channel kernel to each current sample within the current block; A step of obtaining an expected error mapped by the feature vector from a predefined data set (S3040); and A method for decoding an image, comprising the step (S3050) of filtering the current sample using the above-mentioned expected error. In paragraph 1, The step of determining the class of the current block above is, A method for decoding an image, comprising the step of determining the vertical change amount, horizontal change amount, diagonal change amount, and anti-diagonal change amount of the current block by averaging the change amounts of sample values in the vertical direction, horizontal direction, diagonal direction, and anti-diagonal direction for all samples included in the current block. In paragraph 2, The step of determining the class of the current block above is, A method for decoding an image, comprising the step of determining the class of the current block using a first comparison result comparing the magnitude of the vertical change amount and the horizontal change amount of the current block and a second comparison result comparing the magnitude of the diagonal change amount and the opposite diagonal change amount of the current block. In paragraph 1, A method for decoding an image, wherein the above multi-channel kernel includes a vertical filter kernel, a horizontal filter kernel, and a mixed filter kernel. In paragraph 4, The step of determining the above feature vector is, A method for decoding an image, comprising the step of obtaining a vertical feature for the current sample by applying a first filter coefficient of the vertical filter kernel to the difference between a surrounding sample at a position corresponding to the first filter coefficient and the current sample. In paragraph 4, The step of determining the above feature vector is, A method for decoding an image, comprising the step of obtaining a horizontal feature for the current sample by applying a second filter coefficient of the horizontal filter kernel to the difference between a surrounding sample at a position corresponding to the second filter coefficient and the current sample. In paragraph 4, The step of determining the above feature vector is, A method for decoding an image, comprising the step of obtaining a mixed feature for the current sample by applying a third filter coefficient of the mixed filter kernel to the difference between a surrounding sample at a position corresponding to the third filter coefficient and the current sample. In paragraph 4, The first filter coefficients of the above vertical filter kernel are symmetric with respect to the central vertical line, and The second filter coefficients of the above horizontal filter kernel are symmetric with respect to the center horizontal line, and A method for decoding an image in which the third filter coefficients of the above-mentioned mixed filter kernel are symmetric with respect to a central vertical line and a central horizontal line. In paragraph 1, The step of determining the above feature vector is, A method for decoding an image, comprising the step of preprocessing the difference between a current sample and a surrounding sample at a position corresponding to each filter coefficient of a plurality of filter kernels included in the multi-channel kernel based on a predetermined clipping function. In paragraph 1, The step of determining the above feature vector is, A method for decoding an image, comprising the step of performing quantization on the vertical features, horizontal features, and mixed features of the current sample. In paragraph 1, It further includes the step of obtaining a scale factor representing the scale of sample correction, and A method for decoding an image, wherein the current sample is filtered using an estimated error modified based on the scale factor. In paragraph 1, A method for decoding an image, wherein the above-mentioned predefined data set is stored in the form of a lookup table. In an image decoding device, At least one memory storing at least one instruction; and It includes at least one processor that operates according to the above at least one instruction, and The above-mentioned at least one processor is, Determine the class of the current block based on the amount of change in sample values for each sample within the current block, and A multi-channel kernel applied to the current block is determined based on the class of the current block, wherein the multi-channel kernel includes a plurality of predefined filter kernels, and By applying a plurality of filter kernels included in the multi-channel kernel to each current sample within the current block, a feature vector for the current sample is determined, and Obtaining an expected error mapped by the feature vector from a predefined data set, and An image decoding device that filters the current sample using the above-mentioned expected error. In the image encoding method, A step (S3010) of determining the class of the current block based on the gradient of the sample value for each sample within the current block; A step (S3020) of determining a multi-channel kernel applied to the current block based on the class of the current block, wherein the multi-channel kernel includes a plurality of predefined filter kernels; A step (S3030) of determining a feature vector for a current sample by applying a plurality of filter kernels included in the multi-channel kernel to each current sample within the current block; A step of obtaining an expected error mapped by the feature vector from a predefined data set (S3040); and A method for encoding an image, comprising the step (S3050) of filtering the current sample using the above-mentioned expected error. In a computer-readable recording medium that records a bitstream, The above bitstream includes an encoding result generated based on a current image filtered according to an image encoding method, and The above image encoding method is, A step of determining the class of the current block based on the amount of change in sample values for each sample of the current block in the current image; A step of determining a multi-channel kernel applied to the current block based on the class of the current block, wherein the multi-channel kernel includes a plurality of predefined filter kernels; A step of determining a feature vector for a current sample by applying a plurality of filter kernels included in the multi-channel kernel to each current sample within the current block; A step of obtaining an expected error mapped by the feature vector from a predefined data set; and A recording medium comprising the step of filtering the current sample using the above-mentioned expected error.
Citation Information
Patent Citations
Methods and apparatus for in-loop de-artifacting filtering based on multi-lattice sparsity-based filtering
KR101554906B1
Method and apparatus for encoding / decoding high-definition video
KR1020140019011A
Image properties-based adaptive filtering method and device in image coding system
KR1020180019548A
Video decoding method and device thereof and video encoding method and device thereof
KR102331898B1
Image encoding method and device, image decoding method and device
KR102366765B1