Image decoding method, image decoding apparatus, image encoding method, and image encoding apparatus for adaptive loop filtering
The adaptive loop filtering method addresses the challenges of encoding and decoding high-resolution images by reducing noise and errors in filtered blocks, thereby improving image quality through adaptive filter coefficient determination and bitstream generation.
Patent Information
- Application Number
- PCT/KR2024/009792
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-23
- Filing Date
- 2024-07-09
- Publication Date
- 2025-03-20
AI Technical Summary
Existing image encoding and decoding technologies face challenges in efficiently encoding and decoding high-resolution or high-definition image contents, particularly in reducing noise and errors in filtered blocks during predictive encoding and decryption.
The implementation of an adaptive loop filtering method, which involves obtaining information about adaptive loop filtering from a bitstream, acquiring filtered residual samples using multiple filters, and determining adaptive filter coefficients to generate a bitstream with adaptive loop filtering information.
This approach improves the performance of predictive encoding and decryption by reducing noise in filtered blocks and minimizing errors between original and filtered blocks, thereby enhancing image quality.
Smart Images

Figure KR2024009792_20032025_PF_FP_ABST
Abstract
Description
Image decoding method for adaptive loop filtering, image decoding device, image encoding method, and image encoding device
[0001] The present disclosure relates to the field of encoding and decoding of images, and more particularly, to a device and method for encoding and decoding an image by performing adaptive loop filtering on a current block included in the current image.
[0002] Video data is encoded according to a predetermined data compression standard and then stored on a recording medium in the form of a bitstream or transmitted through a communication channel.
[0003] With the development and widespread adoption of hardware capable of playing and storing high-resolution or high-definition video content, the need for codecs that effectively encode or decode this content is increasing. Encoded video content can be played back by decoding it. Recently, methods for effectively compressing high-resolution or high-definition video content have been developed. For example, video compression technologies have been proposed to effectively implement this technology by manipulating the filtering methods used during video encoding and decoding.
[0004] As one of the techniques for manipulating the filtering method, the filtering parameters used in in-loop filtering can be varied and the decoded or encoded data used for filtering can be diversified.
[0005] A method and device for encoding an image, and a method and device for decoding an image, according to one embodiment, aim to improve the performance of predictive encoding and predictive decoding for a current block.
[0006] A method and device for encoding an image according to one embodiment, and a method and device for decoding an image, aim to contribute to improving image quality by reducing noise in a filtered block or reducing an error between an original block and a filtered block.
[0007] The technical problems to be achieved through the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person having ordinary skill in the technical field to which the present disclosure pertains from the description below.
[0008] In one embodiment of the present disclosure, a video decoding method for adaptive loop filtering is provided. The video decoding method may include a step of obtaining information about adaptive loop filtering from a bitstream. The video decoding method may include a step of obtaining a first filtered residual sample corresponding to a current sample by performing filtering using a residual sample for the current sample and a first filter. The video decoding method may include a step of obtaining a second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual sample and a second filter. The video decoding method may include a step of obtaining an adaptive loop filtered sample by using at least one adaptive filter coefficient obtained from the first filtered residual sample, the second filtered residual sample, and the information about adaptive loop filtering.
[0009] In one embodiment of the present disclosure, a video decoding device for adaptive loop filtering is provided, comprising: at least one memory storing at least one instruction; and at least one processor operating according to the at least one instruction. The at least one processor can obtain information regarding adaptive loop filtering from a bitstream. The at least one processor can obtain a first filtered residual sample corresponding to the current sample by filtering a residual sample for the current sample using a first filter. The at least one processor can obtain a second filtered residual sample corresponding to the current sample by filtering using the first filtered residual sample and a second filter. The at least one processor can obtain an adaptive loop filtered sample by using at least one adaptive filter coefficient obtained from the first filtered residual sample, the second filtered residual sample, and the information regarding adaptive loop filtering.
[0010] In one embodiment of the present disclosure, a video encoding method for adaptive loop filtering is provided. The video encoding method may include a step of obtaining a first filtered residual sample corresponding to the current sample by performing filtering using a residual sample for the current sample and a first filter. The video encoding method may include a step of obtaining a second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual block and a second filter. The video encoding method may include a step of determining at least one adaptive filter coefficient for performing adaptive loop filtering on the current block using the first filtered residual sample and the second filtered residual sample. The video encoding method may include a step of generating a bitstream including information regarding adaptive loop filtering based on the adaptive filter coefficient. In one embodiment of the present disclosure, a video encoding device for adaptive loop filtering is provided, the device including at least one memory storing at least one instruction; and at least one processor operating according to the at least one instruction. At least one processor can obtain a first filtered residual sample corresponding to the current sample by performing filtering using a residual sample for the current sample and a first filter. At least one processor can obtain a second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual block and a second filter. At least one processor can determine at least one adaptive filter coefficient for performing adaptive loop filtering for the current block using the first filtered residual sample and the second filtered residual sample. At least one processor can generate a bitstream including information regarding the adaptive loop filtering based on the at least one adaptive filter coefficient.
[0011] In one embodiment of the present disclosure, a computer-readable recording medium having a bitstream recorded thereon is provided. The bitstream may include information regarding adaptive loop filtering. The information regarding adaptive loop filtering may include performing filtering using a residual sample for a current sample and a first filter to obtain a first filtered residual sample corresponding to the current sample, performing filtering using the first filtered residual block and a second filter to obtain a second filtered residual sample corresponding to the current sample, determining at least one adaptive filter coefficient for performing adaptive loop filtering for the current block using the first filtered residual sample and the second filtered residual sample, and based on the determined at least one adaptive filter coefficient.
[0012] A method and device for encoding an image, and a method and device for decoding an image, according to one embodiment, can improve the performance of predictive encoding and predictive decoding for a current block.
[0013] A method and device for encoding an image, and a method and device for decoding an image, according to one embodiment, can contribute to improving image quality by reducing noise in a filtered block or reducing an error between an original block and a filtered block.
[0014] The technical problems to be achieved through the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person having ordinary skill in the technical field to which the present disclosure pertains from the description below.
[0015] FIG. 1 is a block diagram of an image decoding device according to one embodiment.
[0016] FIG. 2 is a block diagram of an image encoding device according to one embodiment.
[0017] FIG. 3 illustrates a process of dividing a current encoding unit to determine at least one encoding unit according to one embodiment.
[0018] FIG. 4 illustrates a process of dividing a non-square coding unit to determine at least one coding unit according to one embodiment.
[0019] FIG. 5 illustrates a process of dividing an encoding unit based on at least one of block shape information and segmentation shape mode information according to one embodiment.
[0020] FIG. 6 illustrates a method for determining a predetermined coding unit among an odd number of coding units according to one embodiment.
[0021] FIG. 7 illustrates the order in which multiple encoding units are processed when a current encoding unit is divided to determine multiple encoding units according to one embodiment.
[0022] FIG. 8 illustrates a process for determining that a current encoding unit is split into an odd number of encoding units when encoding units cannot be processed in a predetermined order according to one embodiment.
[0023] FIG. 9 illustrates a process of dividing a first encoding unit to determine at least one encoding unit according to one embodiment.
[0024] FIG. 10 illustrates that, according to one embodiment, the shapes into which a first encoding unit can be divided are limited when a second encoding unit of a non-square shape determined by splitting the first encoding unit satisfies a predetermined condition.
[0025] FIG. 11 illustrates a process of splitting a square-shaped encoding unit when the split shape mode information cannot represent splitting into four square-shaped encoding units according to one embodiment.
[0026] FIG. 12 illustrates that, according to one embodiment, the processing order between multiple encoding units may vary depending on the process of splitting the encoding units.
[0027] FIG. 13 illustrates a process in which the depth of an encoding unit is determined as the shape and size of the encoding unit change when the encoding unit is recursively split to determine a plurality of encoding units according to one embodiment.
[0028] FIG. 14 illustrates an index (part index, hereinafter referred to as PID) for depth and encoding unit distinction that can be determined according to the shape and size of encoding units according to one embodiment.
[0029] FIG. 15 illustrates that a plurality of coding units are determined according to a plurality of predetermined data units included in a picture according to one embodiment.
[0030] FIG. 16 illustrates encoding units that can be determined for each picture when the combination of forms into which encoding units can be divided is different for each picture according to one embodiment.
[0031] FIG. 17 illustrates various forms of encoding units that can be determined based on segmentation form mode information expressed in binary code according to one embodiment.
[0032] FIG. 18 illustrates another form of a coding unit that can be determined based on segmentation mode information expressed in binary code according to one embodiment.
[0033] FIG. 19 is a block diagram of an image encoding and decoding system that performs in-loop filtering according to one embodiment.
[0034] Fig. 20 is a block diagram illustrating a configuration of an image decoding device according to one embodiment.
[0035] FIG. 21 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0036] FIG. 22 is a diagram for explaining an operation of performing filtering on a current sample according to one embodiment.
[0037] FIG. 23 is a diagram for explaining an operation of performing adaptive loop filtering according to one embodiment.
[0038] FIG. 24 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0039] FIG. 25 is a diagram for explaining an operation of performing filtering on a current sample according to one embodiment.
[0040] FIG. 26 is a diagram for explaining an operation of performing filtering on a current sample according to one embodiment.
[0041] FIG. 27 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0042] FIG. 28 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0043] FIG. 29 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0044] FIG. 30 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0045] Figure 31 is a flowchart of an image decoding method according to one embodiment.
[0046] Fig. 32 is a block diagram illustrating a configuration of an image encoding device according to one embodiment.
[0047] Figure 33 is a flowchart of an image encoding method according to one embodiment.
[0048] The present disclosure may be subject to various modifications and various embodiments. Examples 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 alternatives that fall within the spirit and technical scope of the various embodiments.
[0049] When describing embodiments, detailed descriptions of related known technologies may be omitted if they are deemed to unnecessarily obscure the gist of the present disclosure. Furthermore, numbers (e.g., "first," "second," etc.) used in the description of embodiments may correspond to identification symbols used to distinguish one component from another.
[0050] In this 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”, “all of a, b and c”, or variations thereof.
[0051] In the present disclosure, when a component is referred to as being “connected” or “connected” to another component, the component may be directly connected or connected to the other component, but unless there is a specific description to the contrary, the component may also be connected or connected via another component in between.
[0052] In the present disclosure, components expressed as "units", "modules", etc. may be two or more components combined into a single component, or a single component may be divided into two or more more detailed components. In addition, each component described below may additionally perform some or all of the functions performed by other components in addition to its own main function, and some of the main functions performed by each component may be exclusively performed by other components.
[0053] In the present disclosure, 'image' may refer to a picture, a still image, a frame, a moving image composed of a plurality of consecutive still images, or a video.
[0054] In this disclosure, "sample" may refer to data assigned to a sampling location in an image and thus to be processed. For example, a pixel within a frame in a spatial domain may correspond to a sample. A unit containing multiple samples may be defined as a block.
[0055] Hereinafter, with reference to FIGS. 1 to 19, an image encoding method and device based on a tree-structured encoding unit and a transformation unit according to one embodiment, and an image decoding method and device are disclosed.
[0056] FIG. 1 illustrates a block diagram of an image decoding device (100) according to one embodiment.
[0057] 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. In addition, the bitstream acquisition unit (110) and the decoding unit (120) may include a memory that stores commands to be executed by at least one processor.
[0058] The bitstream acquisition unit (110) can receive a bitstream. The bitstream includes information obtained by encoding an image by an image encoding device (200) described below. In addition, 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 by wire or wirelessly, and the bitstream acquisition unit (110) can receive the bitstream by wire or wirelessly. The bitstream acquisition unit (110) can receive the bitstream from a storage medium such as an optical medium, a hard disk, etc. 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.
[0059] To describe in detail the operation of the video decoding device (100), the bitstream acquisition unit (110) can receive a bitstream.
[0060] The image decoding device (100) may perform an operation of obtaining a binstring corresponding to a splitting shape mode of an encoding unit from a bitstream. In addition, the image decoding device (100) may perform an operation of determining a splitting rule of the encoding unit. In addition, the image decoding device (100) may perform an operation of splitting the encoding unit into a plurality of encoding units based on at least one of the binstring corresponding to the splitting shape mode and the splitting rule. In order to determine the splitting rule, the image decoding device (100) may determine a first allowable range of the size of the encoding unit according to a ratio of the width and height of the encoding unit. In order to determine the splitting rule, the image decoding device (100) may determine a second allowable range of the size of the encoding unit according to the splitting shape mode of the encoding unit.
[0061] Below, the division of encoding units according to one embodiment of the present disclosure is described in detail.
[0062] First, a picture can be divided into one or more slices or one or more tiles. A slice or a tile can be a sequence of one or more maximum coding tree units (CTUs). Depending on the implementation, a slice may include one or more tiles, and a slice may include one or more maximum coding units. A slice including one or more tiles can be determined within a picture.
[0063] The concept of a maximum coding block (Coding Tree Block; CTB) contrasts with a maximum coding unit (CTU). A maximum coding block (CTB) is an NxN block containing NxN samples (N is an integer). Each color component can be divided into one or more maximum coding blocks.
[0064] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), a maximum coding unit (CTU) is a unit that includes a maximum coding block of luma samples, two maximum coding blocks of corresponding chroma samples, and syntax structures used to encode the luma samples and chroma samples. When a picture is a monochrome picture, a maximum coding unit is a unit that includes a maximum coding block of monochrome samples and syntax structures used to encode the monochrome samples. When a picture is a picture that is encoded with a color plane that is separated by color components, a maximum coding unit is a unit that includes syntax structures used to encode the picture and samples of the picture.
[0065] A single maximum coding block (CTB) can be divided into MxN coding blocks containing MxN samples (M, N are integers).
[0066] When a picture has a sample array for each Y, Cr, and Cb component, a coding unit (CU) is a unit that includes a coding block for a luma sample and two coding blocks for corresponding chroma samples, and syntax structures used to encode the luma sample and the chroma samples. When a picture is a monochrome picture, a coding unit is a unit that includes a coding block for a monochrome sample and syntax structures used to encode the monochrome samples. When a picture is a picture that is encoded with a color plane that is separated by color component, a coding unit is a unit that includes syntax structures used to encode the picture and samples of the picture.
[0067] As explained above, the maximum coding block and the maximum coding unit are distinct concepts, and the coding block and the coding unit are distinct concepts. That is, the (maximum) coding unit refers to a data structure including a (maximum) coding block including the corresponding sample and a syntax structure corresponding to it. However, since a person skilled in the art can understand that the (maximum) coding unit or the (maximum) coding block refers to a block of a predetermined size including a predetermined number of samples, the following specification will refer to the maximum coding block and the maximum coding unit, or the coding block and the coding unit, without distinction unless there are special circumstances.
[0068] An image can be divided into Coding Tree Units (CTUs). The size of the CTUs can be determined based on information obtained from the bitstream. The shape of the CTUs can be a square of equal size, but is not limited thereto.
[0069] For example, information about the maximum size of a luma coding block can be obtained from the bitstream. For example, the maximum size of the luma coding block indicated by the information about the maximum size of the luma coding block can be one of 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, and 256x256.
[0070] For example, information about the maximum size of a luma coding block capable of being split into two and the luma block size difference can be obtained from the bitstream. The information about the luma block size difference can indicate the size difference between a luma maximum coding unit and a maximum luma coding block capable of being split into two. Therefore, by combining the information about the maximum size of a luma coding block capable of being split into two obtained from the bitstream and the information about the luma block size difference, the size of the luma maximum coding unit can be determined. Using the size of the luma maximum coding unit, the size of the chroma maximum coding unit can also be determined. For example, if the Y: Cb: Cr ratio is 4:2:0 according to the color format, the size of the chroma block can be half the size of the luma block, and similarly, the size of the chroma maximum coding unit can be half the size of the luma maximum coding unit.
[0071] According to one embodiment, since information about the maximum size of a luma coding block capable of binary splitting is obtained from a bitstream, the maximum size of the luma coding block capable of binary splitting can be determined variably. In contrast, the maximum size of a luma coding block capable of ternary splitting can be fixed. For example, the maximum size of a luma coding block capable of ternary splitting in an I picture may be 32x32, and the maximum size of a luma coding block capable of ternary splitting in a P picture or a B picture may be 64x64.
[0072] Additionally, the maximum coding unit can be hierarchically divided into coding units based on the division shape mode information obtained from the bitstream. As the division shape mode information, at least one of information indicating whether quad division is performed, information indicating whether multi-division is performed, division direction information, and division type information can be obtained from the bitstream.
[0073] For example, information indicating whether a quad split is present may indicate whether the current encoding unit is to be quad split (QUAD_SPLIT) or not to be quad split.
[0074] If the current encoding unit is not quad-split, the information indicating whether it is multi-split may indicate whether the current encoding unit will not be split any further (NO_SPLIT) or will be binary / ternary split.
[0075] When the current encoding unit is binary or ternary split, the split direction information indicates that the current encoding unit is split in either the horizontal or vertical direction.
[0076] When the current encoding unit is split in the horizontal or vertical direction, the split type information indicates that the current encoding unit is split into binary split or ternary split.
[0077] Depending on the split direction information and the split type information, the split mode of the current encoding unit can be determined. The split mode when the current encoding unit is split into binaries in the horizontal direction can be determined as binary horizontal split (SPLIT_BT_HOR), the split mode when the current encoding unit is split into ternary horizontal split (SPLIT_TT_HOR), the split mode when the current encoding unit is split into binaries in the vertical direction can be determined as binary vertical split (SPLIT_BT_VER), and the split mode when the current encoding unit is split into ternary vertical split (SPLIT_TT_VER).
[0078] The image decoding device (100) can obtain segmentation shape mode information from a bitstream from a single binstring. The format of the bitstream received by the image decoding device (100) can include a fixed length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The binstring represents information as a series of binary numbers. The binstring can be composed of at least one bit. The image decoding device (100) can obtain segmentation shape mode information corresponding to the binstring based on a segmentation rule. The image decoding device (100) can determine whether to quad-segment an encoding unit, whether not to quad-segment, or the segmentation direction and segmentation type based on a single binstring.
[0079] The coding unit may be smaller than or equal to the maximum coding unit. For example, the maximum coding unit is also a coding unit with the maximum size, so it is a coding unit. If the split shape mode information for the maximum coding unit indicates that it is not split, the coding unit determined from the maximum coding unit has the same size as the maximum coding unit. If the split shape mode information for the maximum coding unit indicates that it is split, the maximum coding unit may be split into coding units. In addition, if the split shape mode information for the coding unit indicates splitting, the coding units may be split into coding units of smaller sizes. However, the splitting of the image is not limited thereto, and the maximum coding unit and the coding units may not be distinguished. The splitting of the coding unit is described in more detail with reference to FIGS. 3 to 16.
[0080] 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.
[0081] The shape and size of the transformation block and the prediction block may be unrelated.
[0082] In another embodiment, prediction may be performed using the encoding unit as a prediction block. Transformation may also be performed using the encoding unit as a transform block.
[0083] The division of a coding unit is described in more detail with reference to FIGS. 3 to 16. The current block and neighboring blocks of the present disclosure may represent one of a maximum coding unit, a coding unit, a prediction block, and a transform block. In addition, the current block or the current coding unit is a block currently being decoded or encoded, or a block currently being divided. The neighboring block may be a block reconstructed before the current block. The neighboring block may be spatially or temporally adjacent to the current block. The neighboring block may be located on one of the lower left, left, upper left, upper right, upper right, right, and lower right sides of the current block.
[0084] 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.
[0085] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN or Nx8N, where N may be a positive integer. The block shape information is information indicating at least one of the shape, direction, width and height ratio or size of the encoding unit.
[0086] The shape of the encoding unit may include square and non-square. When the width and height of the encoding unit are equal (i.e., when the block shape of the encoding unit is 4Nx4N), the image decoding device (100) may determine the block shape information of the encoding unit as square. The image decoding device (100) may determine the shape of the encoding unit as non-square.
[0087] 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 decoding device (100) may determine the block shape information of the encoding unit to be non-square. When the shape of the encoding unit is non-square, the image decoding device (100) may determine the ratio of the width and height among the block shape information of the encoding unit to be at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. Additionally, based on the width length and height length of the encoding unit, the image decoding device (100) can determine whether the encoding unit is in the horizontal or vertical direction. Additionally, based on at least one of the width length, height length, or area of the encoding unit, the image decoding device (100) can determine the size of the encoding unit.
[0088] According to one embodiment, the image decoding device (100) can determine the shape of an encoding unit using block shape information, and can determine the shape into which the encoding unit is divided using segmentation shape mode information. That is, the splitting method of the encoding unit indicated by the segmentation shape mode information can be determined depending on which block shape the block shape information used by the image decoding device (100) indicates.
[0089] The image decoding device (100) can obtain the segmentation shape mode information from the bitstream. However, the present invention is not limited thereto, and the image decoding device (100) and the image encoding device (200) can determine the pre-agreed segmentation shape mode information based on the block shape information. The image decoding device (100) can determine the pre-agreed segmentation shape mode information for the maximum coding unit or the minimum coding unit. For example, the image decoding device (100) can determine the segmentation shape mode information for the maximum coding unit as quad split. In addition, the image decoding device (100) can determine the segmentation shape mode information for the minimum coding unit as “not split.” Specifically, the image decoding device (100) can determine the size of the maximum coding unit as 256x256. The image decoding device (100) can determine the pre-agreed segmentation shape mode information as quad split. Quad splitting is a splitting mode that divides both the width and height of an encoding unit in half. The image decoding device (100) can obtain a coding unit of size 128x128 from a maximum coding unit of size 256x256 based on the splitting mode information. In addition, the image decoding device (100) can determine the size of the minimum coding unit as 4x4. The image decoding device (100) can obtain splitting mode information indicating "not splitting" for the minimum coding unit.
[0090] According to one embodiment, the image decoding device (100) may use block shape information indicating that the current encoding unit is a square shape. For example, the image decoding device (100) may determine whether to not split a square encoding unit, to split it vertically, to split it horizontally, to split it into four encoding units, etc., according to the split 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 split an encoding unit (310a) having the same size as the current encoding unit (300) according to the split shape mode information indicating that it is not split, or may determine a split encoding unit (310b, 310c, 310d, 310e, 310f, etc.) based on the split shape mode information indicating a predetermined splitting method.
[0091] Referring to FIG. 3, the image decoding device (100) may determine two coding units (310b) by vertically dividing the current coding unit (300) based on the split shape mode information indicating that the current coding unit (300) is vertically divided, according to an embodiment. The image decoding device (100) may determine two coding units (310c) by horizontally dividing the current coding unit (300) based on the split shape mode information indicating that the current coding unit (300) is horizontally divided, according to an embodiment. The image decoding device (100) may determine four coding units (310d) by vertically and horizontally dividing the current coding unit (300) based on the split shape mode information indicating that the current coding unit (300) is vertically and horizontally divided, according to an embodiment. The image decoding device (100) may determine three coding units (310e) by vertically dividing the current coding unit (300) based on the split shape mode information indicating that the current coding unit (300) is ternary divided, according to an embodiment. The image decoding device (100) can determine three coding units (310f) into which the current coding unit (300) is horizontally divided based on the division shape mode information indicating that the ternary division is horizontally divided. However, the division shapes into which a square coding unit can be divided should not be interpreted as being limited to the above-described shapes, and may include various shapes that can be indicated by the division shape mode information. Specified division shapes into which a square coding unit is divided will be specifically described below through various embodiments.
[0092] FIG. 4 illustrates a process in which an image decoding device (100) divides a non-square coding unit to determine at least one coding unit according to one embodiment.
[0093] According to one embodiment, the image decoding device (100) may utilize block shape information indicating that the current encoding unit is non-square. The image decoding device (100) may determine whether to not split the current non-square encoding unit or to split it using a predetermined method based on the split 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) according to the split shape mode information indicating that it is not split, or may determine a split encoding unit (420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c) based on the split shape mode information indicating a predetermined splitting method. The predetermined splitting method by which a non-square encoding unit is split will be described in detail through various embodiments below.
[0094] According to one embodiment, the image decoding device (100) may determine a form in which an encoding unit is split using split form mode information, and in this case, the split form mode information may indicate the number of at least one encoding unit generated by splitting the encoding unit. Referring to FIG. 4, when the split form mode information indicates that the current encoding unit (400 or 450) is split into two encoding units, the image decoding device (100) may split the current encoding unit (400 or 450) based on the split form mode information to determine two encoding units (420a, 420b, or 470a, 470b) included in the current encoding unit.
[0095] According to one embodiment, when the image decoding device (100) splits a current encoding unit (400 or 450) having a non-square shape based on split shape mode information, the image decoding device (100) may split the current encoding unit by considering the position of the long side of the non-square current encoding unit (400 or 450). For example, the image decoding device (100) may split the current encoding unit (400 or 450) in a direction that splits the long side of the current encoding unit (400 or 450) by considering the shape of the current encoding unit (400 or 450) to determine a plurality of encoding units.
[0096] According to one embodiment, if the split shape mode information indicates that the coding unit is split into an odd number of blocks (ternary splitting), the image decoding device (100) may determine an odd number of coding units included in the current coding unit (400 or 450). For example, if the split shape mode information indicates that the current coding unit (400 or 450) is split into three coding units, the image decoding device (100) may split the current coding unit (400 or 450) into three coding units (430a, 430b, 430c, 480a, 480b, 480c).
[0097] According to one embodiment, the ratio of the width and height of the current encoding unit (400 or 450) may be 4:1 or 1:4. When the ratio of the width and height is 4:1, the block shape information may be in the horizontal direction because the length of the width is longer than the length of the height. When the ratio of the width and height is 1:4, the block shape information may be in the vertical direction because the length of the width is shorter than the length of the height. The image decoding device (100) may determine to split the current encoding unit into an odd number of blocks based on the split shape mode information. In addition, the image decoding device (100) may determine the splitting direction of the current encoding unit (400 or 450) based on the block shape information of the current encoding unit (400 or 450). For example, if the current encoding unit (400) is in the vertical direction, the image decoding device (100) can divide the current encoding unit (400) in the horizontal direction to determine encoding units (430a, 430b, 430c). Also, if the current encoding unit (450) is in the horizontal direction, the image decoding device (100) can divide the current encoding unit (450) in the vertical direction to determine encoding units (480a, 480b, 480c).
[0098] According to one embodiment, the image decoding device (100) may determine an odd number of coding units included in the current coding unit (400 or 450), and the sizes of the determined coding units may not all be the same. For example, among the determined odd number of coding units (430a, 430b, 430c, 480a, 480b, 480c), the size of a given coding unit (430b or 480b) may have a different size from the other coding units (430a, 430c, 480a, 480c). That is, the encoding units into which the current encoding unit (400 or 450) can be divided and determined can have multiple types of sizes, and in some cases, an odd number of encoding units (430a, 430b, 430c, 480a, 480b, 480c) can each have different sizes.
[0099] According to one embodiment, when the split shape mode information indicates that the coding unit is split into an odd number of blocks, the image decoding device (100) can determine an odd number of coding units included in the current coding unit (400 or 450), and further, the image decoding device (100) can place a predetermined restriction on at least one coding unit among the odd number of coding units generated by splitting. Referring to FIG. 4, the image decoding device (100) can perform a decoding process for a coding unit (430b, 480b) located in the center among three coding units (430a, 430b, 430c, 480a, 480b, 480c) generated by splitting the current coding unit (400 or 450) differently from the decoding process for other coding units (430a, 430c, 480a, 480c). For example, the image decoding device (100) can restrict the encoding unit (430b, 480b) located in the center from being split any further, unlike other encoding units (430a, 430c, 480a, 480c), or can restrict it to be split only a predetermined number of times.
[0100] FIG. 5 illustrates a process in which an image decoding device (100) divides an encoding unit based on at least one of block shape information and division shape mode information according to one embodiment.
[0101] According to one embodiment, the image decoding device (100) may determine whether to split or not to split a first coding unit (500) having a square shape into coding units based on at least one of block shape information and split shape mode information. According to one embodiment, when the split shape mode information indicates splitting the first coding unit (500) in the horizontal direction, the image decoding device (100) may split the first coding unit (500) in the horizontal direction to determine a second coding unit (510). The first coding unit, the second coding unit, and the third coding unit used according to one embodiment are terms used to understand the relationship before and after splitting between coding units. For example, when the first coding unit is split, the second coding unit may be determined, and when the second coding unit is split, the third coding unit may be determined. Hereinafter, the relationship between the first coding unit, the second coding unit, and the third coding unit used may be understood to follow the above-described characteristics.
[0102] According to one embodiment, the image decoding device (100) may determine to split or not split the determined second encoding unit (510) into encoding units based on the split shape mode information. Referring to FIG. 5, the image decoding device (100) may split the first encoding unit (500) based on the split shape mode information to split the determined second encoding unit (510) of a non-square shape into at least one third encoding unit (520a, 520b, 520c, 520d, etc.) or may not split the second encoding unit (510). The image decoding device (100) can obtain split shape mode information, and the image decoding device (100) can split the first encoding unit (500) based on the obtained split shape mode information to split a plurality of second encoding units (e.g., 510) of various shapes, and the second encoding unit (510) can be split according to the way in which the first encoding unit (500) is split based on the split shape mode information. According to one embodiment, when the first encoding unit (500) is split into the second encoding unit (510) based on the split shape mode information for the first encoding unit (500), the second encoding unit (510) can also be split into the third encoding unit (e.g., 520a, 520b, 520c, 520d, etc.) based on the split shape mode information for the second encoding unit (510). That is, the coding unit can be recursively split based on the split shape mode information associated with each coding unit. Accordingly, a square coding unit can be determined from a non-square coding unit, and such a square coding unit can be recursively split to determine a non-square coding unit.
[0103] Referring to FIG. 5, among the odd number of third coding units (520b, 520c, 520d) determined by splitting the second coding unit (510) having a non-square shape, a predetermined coding unit (e.g., a coding unit located in the middle or a coding unit having a square shape) may be split recursively. According to an embodiment, the non-square third coding unit (520b), which is one of the odd number of third coding units (520b, 520c, 520d), may be split horizontally into a plurality of fourth coding units. The non-square fourth coding unit (530b or 530d), which is one of the plurality of fourth coding units (530a, 530b, 530c, 530d), may be split again into a plurality of coding units. For example, the fourth coding unit (530b or 530d) having a non-square shape may be further divided into an odd number of coding units. Methods that can be used for recursive division of coding units will be described later through various embodiments.
[0104] According to one embodiment, the image decoding device (100) may split each of the third encoding units (520a, 520b, 520c, 520d, etc.) into encoding units based on the split shape mode information. In addition, the image decoding device (100) may determine not to split the second encoding unit (510) based on the split shape mode information. According to one embodiment, the image decoding device (100) may split the second encoding unit (510) having a non-square shape into an odd number of third encoding units (520b, 520c, 520d). The image decoding device (100) may place a predetermined restriction on a predetermined third encoding unit among the odd number of third encoding units (520b, 520c, 520d). For example, the image decoding device (100) can limit the encoding unit (520c) located in the middle among an odd number of third encoding units (520b, 520c, 520d) to not be divided any further or to be divided a settable number of times.
[0105] Referring to FIG. 5, the image decoding device (100) may limit the coding unit (520c) located in the middle among the odd number of third coding units (520b, 520c, 520d) included in the second coding unit (510) having a non-square shape to not be split any further, or to be split in a predetermined split form (for example, to be split only into four coding units or to be split in a form corresponding to the split form of the second coding unit (510), or to be split only a predetermined number of times (for example, to be split only n times, where n>0). However, the above limitations on the coding unit (520c) located in the middle are merely simple embodiments and should not be interpreted as being limited to the above-described embodiments, but should be interpreted as including various limitations in which the coding unit (520c) located in the middle can be decoded differently from the other coding units (520b, 520d).
[0106] According to one embodiment, the image decoding device (100) can obtain the segmentation shape mode information used to segment the current encoding unit from a predetermined location within the current encoding unit.
[0107] 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.
[0108] Referring to FIG. 6, the split shape mode information of the current encoding unit (600, 650) can be obtained from a sample at a predetermined position among a plurality of samples included in the current encoding unit (600, 650) (for example, a sample (640, 690) located in the center). However, the predetermined position within the current encoding unit (600) from which at least one of the split shape mode information can be obtained should not be interpreted as being limited to the center position illustrated in FIG. 6, but should be interpreted as including various positions (for example, top, bottom, left, right, upper left, lower left, upper right, or lower right, etc.) that can be included within the current encoding unit (600). The image decoding device (100) can obtain the split shape mode information obtained from the predetermined position and determine whether or not to split the current encoding unit into encoding units of various shapes and sizes.
[0109] According to one embodiment, the image decoding device (100) may select one of the coding units when the current coding unit is divided into a predetermined number of coding units. Various methods may be used to select one of the multiple coding units, and descriptions of such methods will be provided later through various embodiments.
[0110] According to one embodiment, the image decoding device (100) can divide the current encoding unit into a plurality of encoding units and determine an encoding unit at a predetermined position.
[0111] According to one embodiment, the image decoding device (100) may use information indicating the positions of each of the odd-numbered coding units to determine an coding unit located in the middle of the odd-numbered coding units. Referring to FIG. 6, the image decoding device (100) may divide the current coding unit (600) or the current coding unit (650) to determine odd-numbered coding units (620a, 620b, 620c) or odd-numbered coding units (660a, 660b, 660c). The image decoding device (100) may use information about the positions of the odd-numbered coding units (620a, 620b, 620c) or odd-numbered coding units (660a, 660b, 660c) to determine the middle coding unit (620b) or the middle coding unit (660b). For example, the image decoding device (100) can determine the coding unit (620b) located in the center by determining the positions of the coding units (620a, 620b, 620c) based on information indicating the positions of predetermined samples included in the coding units (620a, 620b, 620c). Specifically, the image decoding device (100) can determine the coding unit (620b) located in the center by determining the positions of the coding units (620a, 620b, 620c) based on information indicating the positions of samples (630a, 630b, 630c) at the upper left of the coding units (620a, 620b, 620c).
[0112] According to one embodiment, information indicating the positions of the upper left samples (630a, 630b, 630c) included in each of the coding units (620a, 620b, 620c) may include information on the positions or coordinates of the coding units (620a, 620b, 620c) within the picture. According to one embodiment, information indicating the positions of the upper left samples (630a, 630b, 630c) included in each of the coding units (620a, 620b, 620c) may include information indicating the width or height of the coding units (620a, 620b, 620c) included in the current coding unit (600), and this width or height may correspond to information indicating the difference between the coordinates of the coding units (620a, 620b, 620c) within the picture. That is, the image decoding device (100) can determine the encoding unit (620b) located in the center by directly using information about the positions or coordinates of the encoding units (620a, 620b, 620c) within the picture or by using information about the width or height of the encoding unit corresponding to the difference between the coordinates.
[0113] According to one embodiment, information indicating the position of the sample (630a) at the upper left of the upper encoding unit (620a) may represent (xa, ya) coordinates, information indicating the position of the sample (530b) at the upper left of the middle encoding unit (620b) may represent (xb, yb) coordinates, and information indicating the position of the sample (630c) at the upper left of the lower encoding unit (620c) may represent (xc, yc) coordinates. The image decoding device (100) may determine the middle encoding unit (620b) using the coordinates of the upper left samples (630a, 630b, 630c) included in the encoding units (620a, 620b, 620c), respectively. For example, when the coordinates of the samples (630a, 630b, 630c) on the upper left are sorted in ascending or descending order, the encoding unit (620b) including the coordinates (xb, yb) of the sample (630b) located in the center can be determined as the encoding unit located in the center among the encoding units (620a, 620b, 620c) determined by dividing the current encoding unit (600). However, the coordinates indicating the positions of the upper left samples (630a, 630b, 630c) may indicate coordinates indicating the absolute positions within the picture, and further, based on the position of the upper left sample (630a) of the upper left coding unit (620a), the (dxb, dyb) coordinates, which are information indicating the relative position of the sample (630b) of the upper left of the middle coding unit (620b), and the (dxc, dyc) coordinates, which are information indicating the relative position of the sample (630c) of the upper left of the lower coding unit (620c), may be used. In addition, the method of determining the coding unit of a given position by using the coordinates of the corresponding sample as information indicating the position of the sample included in the coding unit should not be interpreted as being limited to the above-described method, but should be interpreted as various arithmetic methods that can utilize the coordinates of the sample.
[0114] According to one embodiment, the image decoding device (100) may divide the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c), and select an encoding unit from among the encoding units (620a, 620b, 620c) according to a predetermined criterion. For example, the image decoding device (100) may select an encoding unit (620b) having a different size from among the encoding units (620a, 620b, 620c).
[0115] According to one embodiment, the image decoding device (100) may determine the width or height of each of the encoding units (620a, 620b, 620c) by using the (xa, ya) coordinate, which is information indicating the position of the sample (630a) at the upper left of the upper encoding unit (620a), the (xb, yb) coordinate, which is information indicating the position of the sample (630b) at the upper left of the middle encoding unit (620b), and the (xc, yc) coordinate, which is information indicating the position of the sample (630c) at the upper left of the lower encoding unit (620c). The image decoding device (100) can determine the size of each of the encoding units (620a, 620b, 620c) using coordinates (xa, ya), (xb, yb), (xc, yc) indicating the positions of the encoding units (620a, 620b, 620c). According to one embodiment, the image decoding device (100) can determine the width of the upper encoding unit (620a) as the width of the current encoding unit (600). The image decoding device (100) can determine the height of the upper encoding unit (620a) as yb-ya. According to one embodiment, the image decoding device (100) can determine the width of the middle encoding unit (620b) as the width of the current encoding unit (600). The image decoding device (100) may determine the height of the middle encoding unit (620b) as yc-yb. According to one embodiment, the image decoding device (100) may determine the width or height of the lower encoding unit using the width or height of the current encoding unit and the width and height of the upper encoding unit (620a) and the middle encoding unit (620b). The image decoding device (100) may determine an encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (620a, 620b, 620c).Referring to FIG. 6, the image decoding device (100) can determine the middle encoding unit (620b) having a different size from the sizes of the upper encoding unit (620a) and the lower encoding unit (620c) as the encoding unit of a predetermined position. However, the process by which the image decoding device (100) described above determines the encoding unit having a different size from other encoding units is merely an embodiment of determining the encoding unit of a predetermined position using the size of the encoding unit determined based on sample coordinates, and therefore, various processes of determining the encoding unit of a predetermined position by comparing the sizes of the encoding units determined according to predetermined sample coordinates can be used.
[0116] The image decoding device (100) can determine the width or height of each of the encoding units (660a, 660b, 660c) by using the (xd, yd) coordinate, which is information indicating the position of the sample (670a) at the upper left of the left encoding unit (660a), the (xe, ye) coordinate, which is information indicating the position of the sample (670b) at the upper left of the middle encoding unit (660b), and the (xf, yf) coordinate, which is information indicating the position of the sample (670c) at the upper left of the right encoding unit (660c). The image decoding device (100) can determine the size of each of the encoding units (660a, 660b, 660c) by using the (xd, yd), (xe, ye), (xf, yf), which are coordinates indicating the positions of the encoding units (660a, 660b, 660c).
[0117] According to one embodiment, the image decoding device (100) may determine the width of the left encoding unit (660a) as xe-xd. The image decoding device (100) may determine the height of the left encoding unit (660a) as the height of the current encoding unit (650). According to one embodiment, the image decoding device (100) may determine the width of the middle encoding unit (660b) as xf-xe. The image decoding device (100) may determine the height of the middle encoding unit (660b) as the height of the current encoding unit (600). According to one embodiment, the image decoding device (100) may determine the width or height of the right encoding unit (660c) using the width or height of the current encoding unit (650) and the widths and heights of the left encoding unit (660a) and the middle encoding unit (660b). The image decoding device (100) can determine an encoding unit having a different size from other encoding units based on the width and height of the determined encoding units (660a, 660b, 660c). Referring to FIG. 6, the image decoding device (100) can determine a middle encoding unit (660b) having a different size from the sizes of the left encoding unit (660a) and the right encoding unit (660c) as an encoding unit at a predetermined position. However, the process of the image decoding device (100) described above determining an encoding unit having a different size from other encoding units is merely an embodiment of determining an encoding unit at a predetermined position using the size of the encoding unit determined based on sample coordinates, and therefore, various processes of determining an encoding unit at a predetermined position by comparing the sizes of the encoding units determined according to predetermined sample coordinates can be used.
[0118] However, the location of the sample considered for determining the location of the encoding unit should not be interpreted as being limited to the upper left corner described above, and it can be interpreted that information on the location of any sample included in the encoding unit can be used.
[0119] According to one embodiment, the image decoding device (100) may select an encoding unit at a predetermined position from among an odd number of encoding units determined by splitting the current encoding unit, taking into consideration the shape of the current encoding unit. For example, if the current encoding unit has a non-square shape in which the width is longer than the height, the image decoding device (100) may determine an encoding unit at a predetermined position in the horizontal direction. That is, the image decoding device (100) may determine one of the encoding units whose positions vary in the horizontal direction and place a restriction on the corresponding encoding unit. If the current encoding unit has a non-square shape in which the height is longer than the width, the image decoding device (100) may determine an encoding unit at a predetermined position in the vertical direction. That is, the image decoding device (100) may determine one of the encoding units whose positions vary in the vertical direction and place a restriction on the corresponding encoding unit.
[0120] According to one embodiment, the image decoding device (100) may use information indicating the positions of each of the even-numbered coding units to determine the coding unit at a predetermined position among the even-numbered coding units. The image decoding device (100) may determine the even-numbered coding units by dividing the current coding unit (binary dividing) and may determine the coding unit at a predetermined position using information about the positions of the even-numbered coding units. A specific process for this may be a process corresponding to the process of determining the coding unit at a predetermined position (e.g., the center position) among the odd-numbered coding units described above in FIG. 6, and thus will be omitted.
[0121] According to one embodiment, when a current encoding unit having a non-square shape is split into a plurality of encoding units, predetermined information about the encoding unit at a predetermined position may be used during the splitting process to determine an encoding unit at a predetermined position among the plurality of encoding units. For example, the image decoding device (100) may use at least one of block shape information and split shape mode information stored in a sample included in a middle encoding unit during the splitting process to determine an encoding unit located in the middle among the encoding units into which the current encoding unit is split.
[0122] Referring to FIG. 6, the image decoding device (100) can split the current encoding unit (600) into a plurality of encoding units (620a, 620b, 620c) based on the split shape 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 position where the split shape mode information is acquired. That is, the split shape mode information of the current encoding unit (600) can be obtained from a sample (640) located in the center of the current encoding unit (600), and when the current encoding unit (600) is split into a plurality of encoding units (620a, 620b, 620c) based on the split shape mode information, the encoding unit (620b) including the sample (640) can be determined as the encoding unit located in the center. However, the information used to determine the encoding unit located in the center should not be interpreted as being limited to the split shape mode information, and various types of information can be used in the process of determining the encoding unit located in the center.
[0123] According to one embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, the image decoding device (100) may use split shape mode information obtained from a sample at a predetermined position within the current coding unit (600) (e.g., a sample located at the center of the current coding unit (600)) to determine a coding unit at a predetermined position among a plurality of coding units (620a, 620b, 620c) determined by splitting the current coding unit (600) (e.g., a coding unit located at the center of the coding units split into multiple units). That is, the image decoding device (100) can determine the sample at the predetermined position by considering the block shape of the current encoding unit (600), and the image decoding device (100) can determine an encoding unit (620b) that includes a sample from which predetermined information (e.g., division shape mode information) can be obtained among a plurality of encoding units (620a, 620b, 620c) determined by dividing the current encoding unit (600), and can set a predetermined restriction. Referring to FIG. 6, according to one embodiment, the image decoding device (100) can determine a sample (640) located at the center of the current encoding unit (600) as a sample from which predetermined information can be obtained, and the image decoding device (100) can set a predetermined restriction on the encoding unit (620b) that includes such a sample (640) during the decoding process. However, the location of the sample from which certain information can be obtained should not be interpreted as being limited to the above-described location, but may be interpreted as samples at any location included in the encoding unit (620b) to be determined in order to set a limitation.
[0124] According to one embodiment, the position of a sample from which predetermined information can be obtained may be determined according to the shape of the current encoding unit (600). According to one embodiment, the block shape information may determine whether the shape of the current encoding unit is square or non-square, and may determine the position of a sample from which predetermined information can be obtained according to the shape. For example, the image decoding apparatus (100) may determine a sample located on a boundary that divides at least one of the width and height of the current encoding unit in half as a sample from which predetermined information can be obtained, using at least one of information about the width and information about the height of the current encoding unit. As another example, when the block shape information related to the current encoding unit indicates that the shape is non-square, the image decoding apparatus (100) may determine one of the samples adjacent to the boundary that divides the long side of the current encoding unit in half as a sample from which predetermined information can be obtained.
[0125] According to one embodiment, when the image decoding device (100) divides the current encoding unit into a plurality of encoding units, the image decoding device (100) may use the split shape 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 the split shape 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 splitting the current encoding unit using the split shape mode information obtained from the 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 split shape mode information obtained from the sample at a predetermined position included in each of the encoding units. Since the recursive division process of the encoding unit has been described above with reference to FIG. 5, a detailed description thereof will be omitted.
[0126] According to one embodiment, the image decoding device (100) can divide a current encoding unit to determine at least one encoding unit, and can determine the order in which the at least one encoding unit is decoded according to a predetermined block (e.g., the current encoding unit).
[0127] FIG. 7 illustrates the order in which multiple encoding units are processed when an image decoding device (100) divides a current encoding unit to determine multiple encoding units according to one embodiment.
[0128] According to one embodiment, the image decoding device (100) may determine second encoding units (710a, 710b) by vertically splitting the first encoding unit (700) according to the splitting shape mode information, determine second encoding units (730a, 730b) by horizontally splitting the first encoding unit (700), or determine second encoding units (750a, 750b, 750c, 750d) by vertically and horizontally splitting the first encoding unit (700).
[0129] Referring to FIG. 7, the image decoding device (100) can determine the order in which the second encoding units (710a, 710b) determined by vertically dividing the first encoding unit (700) are processed in the horizontal direction (710c). The image decoding device (100) can determine the order in which the second encoding units (730a, 730b) determined by horizontally dividing the first encoding unit (700) are processed in the vertical direction (730c). The image decoding device (100) can determine the second encoding units (750a, 750b, 750c, 750d) determined by dividing the first encoding unit (700) in the vertical and horizontal directions according to a predetermined order (e.g., raster scan order (750e) or z scan order (z scan order)) in which encoding units located in one row are processed and then encoding units located in the next row are processed.
[0130] According to one embodiment, the image decoding device (100) can recursively split the encoding units. Referring to FIG. 7, the image decoding device (100) can split the first encoding unit (700) to determine a plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d), and can recursively split each of the determined plurality of encoding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d). A method for splitting a plurality of coding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may be a method corresponding to a method for splitting the first coding unit (700). Accordingly, the plurality of coding units (710a, 710b, 730a, 730b, 750a, 750b, 750c, 750d) may each be independently split into a plurality of coding units. Referring to FIG. 7, the image decoding device (100) may split the first coding unit (700) in the vertical direction to determine the second coding units (710a, 710b), and further may determine to independently split or not split each of the second coding units (710a, 710b).
[0131] According to one embodiment, the image decoding device (100) may horizontally divide the second encoding unit (710a) on the left into third encoding units (720a, 720b), and may not divide the second encoding unit (710b) on the right.
[0132] According to one embodiment, the processing order of the coding units may be determined based on the splitting process of the coding units. In other words, the processing order of the split coding units may be determined based on the processing order of the coding units immediately before splitting. The image decoding device (100) may determine the processing order of the third coding units (720a, 720b) determined by splitting the second coding unit (710a) on the left, independently from the second coding unit (710b) on the right. Since the second coding unit (710a) on the left is split horizontally and the third coding units (720a, 720b) are determined, the third coding units (720a, 720b) may be processed in the vertical direction (720c). In addition, since the order in which the second encoding unit (710a) on the left and the second encoding unit (710b) on the right are processed corresponds to the horizontal direction (710c), the right encoding unit (710b) can be processed after the third encoding units (720a, 720b) included in the second encoding unit (710a) on the left are processed in the vertical direction (720c). Since the above-described content is intended to explain the process in which the processing order of the encoding units is determined according to the encoding units before splitting, it should not be interpreted as being limited to the above-described embodiment, but should be interpreted as being used in various ways in which encoding units that are split and determined in various forms can be independently processed according to a predetermined order.
[0133] FIG. 8 illustrates a process for determining that a current encoding unit is divided into an odd number of encoding units when the encoding units cannot be processed in a predetermined order, according to one embodiment of the present invention.
[0134] According to one embodiment, the image decoding device (100) may determine that the current encoding unit is split into an odd number of encoding units based on the acquired split shape mode information. Referring to FIG. 8, a first encoding unit (800) having a square shape may be split into second encoding units (810a, 810b) having a non-square shape, and the second encoding units (810a, 810b) may each be independently split into third encoding units (820a, 820b, 820c, 820d, 820e). According to one embodiment, the image decoding device (100) can determine a plurality of third encoding units (820a, 820b) by horizontally dividing the left encoding unit (810a) among the second encoding units, and can divide the right encoding unit (810b) into an odd number of third encoding units (820c, 820d, 820e).
[0135] According to one embodiment, the image decoding device (100) can determine whether there is an odd number of split 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 splitting the first encoding unit (800). The image decoding device (100) can determine whether the first encoding unit (800), the second encoding unit (810a, 810b), or the third encoding unit (820a, 820b, 820c, 820d, 820e) is divided into an odd number of encoding units based on at least one of the block shape information and the split shape mode information. For example, the encoding unit located on the right side of the second encoding unit (810a, 810b) can be divided into an odd number of third encoding units (820c, 820d, 820e). The order in which the plurality of encoding units included in the first encoding unit (800) are processed can be a predetermined order (e.g., z-scan order (830)), and the image decoding device (100) can determine whether the third encoding unit (820c, 820d, 820e) determined by dividing the second encoding unit (810b) on the right into odd numbers satisfies the condition that it can be processed according to the predetermined order.
[0136] According to one embodiment, the image decoding device (100) may determine whether the third encoding units (820a, 820b, 820c, 820d, 820e) included in the first encoding unit (800) satisfy a condition that they can be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the second encoding unit (810a, 810b) is split in half according to the boundary of the third encoding unit (820a, 820b, 820c, 820d, 820e). For example, the third encoding unit (820a, 820b) determined by splitting the height of the left second encoding unit (810a) of a non-square shape in half may satisfy the condition. Since the boundaries of the third encoding units (820c, 820d, 820e) determined by dividing the right second encoding unit (810b) into three encoding units do not divide the width or height of the right second encoding unit (810b) in half, it may be determined that the third encoding units (820c, 820d, 820e) do not satisfy the condition. In the case where this condition is not satisfied, the image decoding device (100) may determine that there is a disconnection in the scanning order, and may determine that the right second encoding unit (810b) is divided into an odd number of encoding units based on the determination result. According to an embodiment, the image decoding device (100) may place a predetermined restriction on an encoding unit at a predetermined position among the divided encoding units when the encoding unit is divided into an odd number of encoding units. Since the contents of such restrictions or predetermined positions have been described above through various embodiments, a detailed description thereof will be omitted.
[0137] 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.
[0138] According to one embodiment, the image decoding device (100) may split the first coding unit (900) based on the split shape mode information acquired through the bitstream acquisition unit (110). The first coding unit (900) having a square shape may be split into four coding units having a square shape or may be split into a plurality of coding units having a non-square shape. For example, referring to FIG. 9, when the first coding unit (900) is square and the split shape mode information indicates that it is split into non-square coding units, the image decoding device (100) may split the first coding unit (900) into a plurality of non-square coding units. Specifically, when the split shape mode information indicates that the first encoding unit (900) is split in the horizontal direction or the vertical direction to determine an odd number of encoding units, the image decoding device (100) can split the first encoding unit (900) having a square shape into second encoding units (910a, 910b, 910c) determined by splitting them in the vertical direction into an odd number of encoding units or second encoding units (920a, 920b, 920c) determined by splitting them in the horizontal direction.
[0139] According to one embodiment, the image decoding device (100) can determine whether the second encoding units (910a, 910b, 910c, 920a, 920b, 920c) included in the first encoding unit (900) satisfy a condition that allows them to be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the first encoding unit (900) is split in half according to the boundary of the second encoding units (910a, 910b, 910c, 920a, 920b, 920c). Referring to FIG. 9, since the boundaries of the second coding units (910a, 910b, 910c) determined by vertically dividing the first coding unit (900) in a square shape do not divide the width of the first coding unit (900) in half, it may be determined that the first coding unit (900) does not satisfy the condition that it can be processed in a predetermined order. In addition, since the boundaries of the second coding units (920a, 920b, 920c) determined by horizontally dividing the first coding unit (900) in a square shape do not divide the height of the first coding unit (900) in half, it may be determined that the first coding unit (900) does not satisfy the condition that it can be processed in a predetermined order. If such a condition is not satisfied, the image decoding device (100) may determine that the scan order is disconnected, and based on the determination result, may determine that the first encoding unit (900) is divided into an odd number of encoding units. According to one embodiment, the image decoding device (100) may place a predetermined restriction on an encoding unit at a predetermined position among the divided encoding units when the encoding unit is divided into an odd number of encoding units. Since the contents of such restrictions or predetermined positions, etc. have been described above through various embodiments, a detailed description thereof will be omitted.
[0140] According to one embodiment, the image decoding device (100) can divide the first encoding unit to determine encoding units of various shapes.
[0141] Referring to FIG. 9, the image decoding device (100) can divide the first encoding unit (900) having a square shape and the first encoding unit (930 or 950) having a non-square shape into encoding units of various shapes.
[0142] FIG. 10 illustrates that, according to one embodiment, a video decoding device (100) limits the shapes into which a second encoding unit can be divided when a non-square shape of a second encoding unit determined by splitting a first encoding unit (1000) satisfies a predetermined condition.
[0143] According to one embodiment, the image decoding device (100) may determine to split a first coding unit (1000) having a square shape into second coding units (1010a, 1010b, 1020a, 1020b) having a non-square shape based on the split shape mode information acquired through the bitstream acquisition unit (110). The second coding units (1010a, 1010b, 1020a, 1020b) may be split independently. Accordingly, the image decoding device (100) may determine to split or not split into a plurality of coding units based on the split shape mode information related to each of the second coding units (1010a, 1010b, 1020a, 1020b). According to one embodiment, the image decoding device (100) may determine third encoding units (1012a, 1012b) by horizontally dividing the left second encoding unit (1010a) having a non-square shape determined by vertically dividing the first encoding unit (1000). However, when the image decoding device (100) divides the left second encoding unit (1010a) in the horizontal direction, the right second encoding unit (1010b) may be restricted from being horizontally divided in the same direction as the direction in which the left second encoding unit (1010a) is divided. If the second encoding unit on the right (1010b) is split in the same direction to determine the third encoding unit (1014a, 1014b), the second encoding unit on the left (1010a) and the second encoding unit on the right (1010b) may be independently split in the horizontal direction to determine the third encoding unit (1012a, 1012b, 1014a, 1014b). However, this is the same result as the image decoding device (100) splitting the first encoding unit (1000) into four square-shaped second encoding units (1030a, 1030b, 1030c, 1030d) based on the split shape mode information, which may be inefficient in terms of image decoding.
[0144] According to one embodiment, the image decoding device (100) may determine third coding units (1022a, 1022b, 1024a, 1024b) by vertically dividing a second coding unit (1020a or 1020b) having a non-square shape determined by dividing a first coding unit (1000) in a horizontal direction. However, when the image decoding device (100) vertically divides one of the second coding units (e.g., the upper second coding unit (1020a)), the other second coding units (e.g., the lower coding unit (1020b)) may be restricted from being vertically divided in the same direction as the direction in which the upper second coding unit (1020a) is divided, for the reasons described above.
[0145] FIG. 11 illustrates a process in which an image decoding device (100) divides a square-shaped encoding unit when the split shape mode information cannot indicate that the encoding unit is divided into four square-shaped encoding units according to one embodiment.
[0146] According to one embodiment, the image decoding device (100) may split the first encoding unit (1100) based on the split shape mode information to determine the second encoding units (1110a, 1110b, 1120a, 1120b, etc.). The split shape mode information may include information about various shapes into which the encoding unit may be split, but the information about various shapes may not include information for splitting the encoding unit into four encoding units having a square shape. According to this split shape mode information, the image decoding device (100) cannot split the first encoding unit (1100) having a square shape into four second encoding units having a square shape (1130a, 1130b, 1130c, 1130d). Based on the segmentation shape mode information, the image decoding device (100) can determine a second encoding unit (1110a, 1110b, 1120a, 1120b, etc.) of a non-square shape.
[0147] According to one embodiment, the image decoding device (100) can independently split each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) having a non-square shape. Each of the second encoding units (1110a, 1110b, 1120a, 1120b, etc.) can be split in a predetermined order using a recursive method, which may be a splitting method corresponding to a method in which the first encoding unit (1100) is split based on splitting shape mode information.
[0148] For example, the image decoding device (100) can determine third coding units (1112a, 1112b) having a square shape by splitting the left second coding unit (1110a) in the horizontal direction, and can determine third coding units (1114a, 1114b) having a square shape by splitting the right second coding unit (1110b) in the horizontal direction. Furthermore, the image decoding device (100) can also determine third coding units (1116a, 1116b, 1116c, 1116d) having a square shape by splitting both the left second coding unit (1110a) and the right second coding unit (1110b) in the horizontal direction. In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).
[0149] As another example, the image decoding device (100) may determine third coding units (1122a, 1122b) having a square shape by vertically splitting the upper second coding unit (1120a), and may determine third coding units (1124a, 1124b) having a square shape by vertically splitting the lower second coding unit (1120b). Furthermore, the image decoding device (100) may determine third coding units (1126a, 1126b, 1126a, 1126b) having a square shape by vertically splitting both the upper second coding unit (1120a) and the lower second coding unit (1120b). In this case, the encoding unit can be determined in the same form as the first encoding unit (1100) being divided into four square-shaped second encoding units (1130a, 1130b, 1130c, 1130d).
[0150] FIG. 12 illustrates that, according to one embodiment, the processing order between multiple encoding units may vary depending on the process of dividing the encoding units.
[0151] According to one embodiment, the image decoding device (100) may split the first encoding unit (1200) based on the split shape mode information. If the block shape is square and the split shape mode information indicates that the first encoding unit (1200) is split in at least one of the horizontal direction and the vertical direction, the image decoding device (100) may split the first encoding unit (1200) to determine second encoding units (e.g., 1210a, 1210b, 1220a, 1220b, etc.). Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) having a non-square shape determined by splitting the first encoding unit (1200) only in the horizontal direction or the vertical direction may be independently split based on the split shape mode information for each. For example, the image decoding device (100) can determine third encoding units (1216a, 1216b, 1216c, 1216d) by horizontally dividing second encoding units (1210a, 1210b) generated by vertically dividing the first encoding unit (1200), and can determine third encoding units (1226a, 1226b, 1226c, 1226d) by vertically dividing second encoding units (1220a, 1220b) generated by horizontally dividing the first encoding unit (1200). Since the process of dividing the second encoding units (1210a, 1210b, 1220a, 1220b) has been described above with reference to FIG. 11, a detailed description thereof will be omitted.
[0152] According to one embodiment, the image decoding device (100) can process encoding units according to a predetermined order. Since the characteristics of processing encoding units according to a predetermined order have been described above with reference to FIG. 7, a detailed description thereof will be omitted. Referring to FIG. 12, the image decoding device (100) can divide a first encoding unit (1200) having a square shape and determine four third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) having a square shape. According to one embodiment, the image decoding device (100) can determine the processing order of the third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) depending on the form in which the first encoding unit (1200) is divided.
[0153] According to one embodiment, the image decoding device (100) may determine third encoding units (1216a, 1216b, 1216c, 1216d) by horizontally dividing the second encoding units (1210a, 1210b) generated by vertically dividing them, and the image decoding device (100) may process the third encoding units (1216a, 1216b, 1216c, 1216d) according to an order (1217) of first processing the third encoding units (1216a, 1216c) included in the left second encoding unit (1210a) in the vertical direction and then processing the third encoding units (1216b, 1216d) included in the right second encoding unit (1210b) in the vertical direction.
[0154] According to one embodiment, the image decoding device (100) may determine third encoding units (1226a, 1226b, 1226c, 1226d) by vertically dividing the second encoding units (1220a, 1220b) generated by being divided in the horizontal direction, and the image decoding device (100) may process the third encoding units (1226a, 1226b, 1226c, 1226d) according to an order (1227) of first processing the third encoding units (1226a, 1226b) included in the upper second encoding unit (1220a) in the horizontal direction and then processing the third encoding units (1226c, 1226d) included in the lower second encoding unit (1220b) in the horizontal direction.
[0155] Referring to FIG. 12, the second encoding units (1210a, 1210b, 1220a, 1220b) can be divided into third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) having a square shape. The second encoding units (1210a, 1210b) determined by being split in the vertical direction and the second encoding units (1220a, 1220b) determined by being split in the horizontal direction are split into different shapes, but according to the third encoding units (1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, 1226d) determined later, the first encoding unit (1200) is ultimately split into encoding units of the same shape. Accordingly, even if the image decoding device (100) determines encoding units of the same shape as a result by recursively splitting the encoding units through different processes based on the split shape mode information, it can process a plurality of encoding units determined in the same shape in different orders.
[0156] FIG. 13 illustrates a process in which the depth of an encoding unit is determined as the shape and size of the encoding unit change when the encoding unit is recursively divided to determine a plurality of encoding units according to one embodiment.
[0157] According to one embodiment, the image decoding device (100) may determine the depth of an encoding unit according to a predetermined criterion. For example, the predetermined criterion may be the length of a long side of the encoding unit. If the length of the long side of the current encoding unit is split to be 2n (n>0) times the length of the long side of the encoding unit before splitting, the image decoding device (100) may determine that the depth of the current encoding unit is increased by n compared to the depth of the encoding unit before splitting. Hereinafter, an encoding unit with an increased depth is expressed as an encoding unit of a lower depth.
[0158] Referring to FIG. 13, according to one embodiment, based on block shape information indicating a square shape (for example, the block shape information may indicate '0: SQUARE'), the image decoding device (100) may divide a first coding unit (1300) having a square shape to determine a second coding unit (1302), a third coding unit (1304), etc. of a lower depth. If the size of the first coding unit (1300) having a square shape is 2Nx2N, the second coding unit (1302) determined by dividing the width and height of the first coding unit (1300) by half may have a size of NxN. Furthermore, the third coding unit (1304) determined by dividing the width and height of the second coding unit (1302) by half may have a size of N / 2xN / 2. In this case, the width and height of the third encoding unit (1304) correspond to 1 / 4 of the width and height of the first encoding unit (1300). When the depth of the first encoding unit (1300) is D, the depth of the second encoding unit (1302), which is 1 / 2 of the width and height of the first encoding unit (1300), may be D+1, and the depth of the third encoding unit (1304), which is 1 / 4 of the width and height of the first encoding unit (1300), may be D+2.
[0159] In one embodiment, based on block shape information indicating a non-square shape (for example, the block shape information may indicate '1: NS_VER' indicating a non-square shape in which the height is longer than the width or '2: NS_HOR' indicating a non-square shape in which the width is longer than the height), the image decoding device (100) may split a first coding unit (1310 or 1320) having a non-square shape to determine a second coding unit (1312 or 1322), a third coding unit (1314 or 1324) of a lower depth, etc.
[0160] The image decoding device (100) can determine a second encoding unit (e.g., 1302, 1312, 1322, etc.) by splitting at least one of the width and height of the first encoding unit (1310) having a size of Nx2N. That is, the image decoding device (100) can split the first encoding unit (1310) in the horizontal direction to determine a second encoding unit (1302) having a size of NxN or a second encoding unit (1322) having a size of NxN / 2, and can also split the first encoding unit (1310) in the horizontal direction and the vertical direction to determine a second encoding unit (1312) having a size of N / 2xN.
[0161] According to one embodiment, the image decoding device (100) may determine a second coding unit (e.g., 1302, 1312, 1322, etc.) by splitting at least one of the width and the height of the first coding unit (1320) having a size of 2NxN. That is, the image decoding device (100) may split the first coding unit (1320) in the vertical direction to determine a second coding unit (1302) having a size of NxN or a second coding unit (1312) having a size of N / 2xN, and may also split the first coding unit (1320) in the horizontal direction and the vertical direction to determine a second coding unit (1322) having a size of NxN / 2.
[0162] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1302) having a size of NxN. That is, the image decoding device (100) may split the second encoding unit (1302) in the vertical direction and the horizontal direction to determine a third encoding unit (1304) having a size of N / 2xN / 2, a third encoding unit (1314) having a size of N / 4xN / 2, or a third encoding unit (1324) having a size of N / 2xN / 4.
[0163] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1312) having a size of N / 2xN. That is, the image decoding device (100) may split the second encoding unit (1312) in the horizontal direction to determine a third encoding unit (1304) having a size of N / 2xN / 2 or a third encoding unit (1324) having a size of N / 2xN / 4, or split the second encoding unit (1312) in the vertical direction and the horizontal direction to determine a third encoding unit (1314) having a size of N / 4xN / 2.
[0164] According to one embodiment, the image decoding device (100) may determine a third encoding unit (e.g., 1304, 1314, 1324, etc.) by splitting at least one of the width and the height of the second encoding unit (1322) having a size of NxN / 2. That is, the image decoding device (100) may split the second encoding unit (1322) in the vertical direction to determine a third encoding unit (1304) having a size of N / 2xN / 2 or a third encoding unit (1314) having a size of N / 4xN / 2, or split the second encoding unit (1322) in the vertical direction and the horizontal direction to determine a third encoding unit (1324) having a size of N / 2xN / 4.
[0165] According to one embodiment, the image decoding device (100) may split a square-shaped encoding unit (e.g., 1300, 1302, 1304) in a horizontal direction or a vertical direction. For example, a first encoding unit (1300) having a size of 2Nx2N may be split in the vertical direction to determine a first encoding unit (1310) having a size of Nx2N, or may be split in the horizontal direction to determine a first encoding unit (1320) having a size of 2NxN. According to one embodiment, when the depth is determined based on the length of the longest side of the encoding unit, the depth of the encoding unit determined by splitting the first encoding unit (1300) having a size of 2Nx2N in the horizontal direction or the vertical direction may be the same as the depth of the first encoding unit (1300).
[0166] According to one embodiment, the width and height of the third coding unit (1314 or 1324) may be 1 / 4 times that of the first coding unit (1310 or 1320). When the depth of the first coding unit (1310 or 1320) is D, the depth of the second coding unit (1312 or 1322), which is 1 / 2 times the width and height of the first coding unit (1310 or 1320), may be D+1, and the depth of the third coding unit (1314 or 1324), which is 1 / 4 times the width and height of the first coding unit (1310 or 1320), may be D+2.
[0167] FIG. 14 illustrates an index (part index, hereinafter referred to as PID) for depth and encoding unit distinction that can be determined according to the shape and size of encoding units according to one embodiment.
[0168] According to one embodiment, the image decoding device (100) may split a first encoding unit (1400) having a square shape to determine second encoding units of various shapes. Referring to FIG. 14, the image decoding device (100) may split the first encoding unit (1400) in at least one of a vertical direction and a horizontal direction according to the split shape mode information to determine second encoding units (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d). That is, the image decoding device (100) can determine the second encoding unit (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) based on the split shape mode information for the first encoding unit (1400).
[0169] According to one embodiment, the depth of the second coding units (1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, 1406d) determined according to the split shape mode information for the first coding unit (1400) having a square shape may be determined based on the length of the long side. For example, since the length of one side of the first coding unit (1400) having a square shape and the length of the long side of the second coding unit (1402a, 1402b, 1404a, 1404b) having a non-square shape are the same, the depth of the first coding unit (1400) and the second coding units (1402a, 1402b, 1404a, 1404b) having a non-square shape may be considered to be the same as D. In contrast, when the image decoding device (100) divides the first encoding unit (1400) into four square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) based on the split shape mode information, the length of one side of the square-shaped second encoding units (1406a, 1406b, 1406c, 1406d) is half the length of one side of the first encoding unit (1400), so the depth of the second encoding units (1406a, 1406b, 1406c, 1406d) may be a depth of D+1, which is one depth lower than D, the depth of the first encoding unit (1400).
[0170] According to one embodiment, the image decoding device (100) may split a first encoding unit (1410) having a height greater than its width into a plurality of second encoding units (1412a, 1412b, 1414a, 1414b, 1414c) in a horizontal direction according to the splitting shape mode information. According to one embodiment, the image decoding device (100) may split a first encoding unit (1420) having a width greater than its height into a plurality of second encoding units (1422a, 1422b, 1424a, 1424b, 1424c) in a vertical direction according to the splitting shape mode information.
[0171] According to one embodiment, the depth of the second coding unit (1412a, 1412b, 1414a, 1414b, 1414c. 1422a, 1422b, 1424a, 1424b, 1424c) determined based on the split shape mode information for the first coding unit (1410 or 1420) of a non-square shape may be determined based on the length of the long side. For example, since the length of one side of the second encoding unit (1412a, 1412b) in the shape of a square is half the length of one side of the first encoding unit (1410) in the shape of a non-square having a height longer than a width, the depth of the second encoding unit (1412a, 1412b) in the shape of a square is D+1, which is one depth lower than the depth D of the first encoding unit (1410) in the shape of a non-square.
[0172] Furthermore, the image decoding device (100) can split a non-square first encoding unit (1410) into an odd number of second encoding units (1414a, 1414b, 1414c) based on the split shape mode information. The odd number of second encoding units (1414a, 1414b, 1414c) can include non-square second encoding units (1414a, 1414c) and square second encoding units (1414b). In this case, since the length of the long side of the second encoding unit (1414a, 1414c) of a non-square shape and the length of one side of the second encoding unit (1414b) of a square shape are half the length of one side of the first encoding unit (1410), the depth of the second encoding unit (1414a, 1414b, 1414c) may be a depth of D+1, which is one depth lower than D, which is the depth of the first encoding unit (1410). The image decoding device (100) may determine the depth of the encoding units associated with the first encoding unit (1420) of a non-square shape, in which the width is longer than the height, in a manner corresponding to the above method of determining the depth of the encoding units associated with the first encoding unit (1410).
[0173] According to one embodiment, when determining an index (PID) for distinguishing divided coding units, the image decoding device (100) may determine the index based on a size ratio between the coding units when the coding units divided into an odd number are not of the same size. Referring to FIG. 14, among the coding units (1414a, 1414b, 1414c) divided into an odd number, the coding unit (1414b) located in the middle may have the same width as the other coding units (1414a, 1414c) but may have a height that is twice the height of the coding units (1414a, 1414c) that are different in height. That is, in this case, the coding unit (1414b) located in the middle may include two of the other coding units (1414a, 1414c). Accordingly, if the index (PID) of the encoding unit (1414b) located in the middle according to the scanning order is 1, the index of the encoding unit (1414c) located in the next order may be 3, which is an increase of 2. In other words, there may be a discontinuity in the index value. According to one embodiment, the image decoding device (100) may determine whether the encoding units divided into an odd number are not of the same size based on the presence or absence of discontinuity in the index for distinguishing between the divided encoding units.
[0174] According to one embodiment, the image decoding device (100) may determine whether the image is divided into a specific split shape based on the value of an index for distinguishing a plurality of coding units that are divided from the current coding unit. Referring to FIG. 14, the image decoding device (100) may divide a first coding unit (1410) having a rectangular shape in which the height is longer than the width, to determine an even number of coding units (1412a, 1412b) or an odd number of coding units (1414a, 1414b, 1414c). The image decoding device (100) may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to one embodiment, the PID may be obtained from a sample (for example, an upper left sample) at a predetermined position of each coding unit.
[0175] According to one embodiment, the image decoding device (100) may determine an coding unit at a predetermined position among the coding units that are divided and determined using an index for distinguishing the coding units. According to one embodiment, when the split shape mode information for the first coding unit (1410) having a rectangular shape with a height longer than the width indicates that the first coding unit (1410) is divided into three coding units, the image decoding device (100) may divide the first coding unit (1410) into three coding units (1414a, 1414b, 1414c). The image decoding device (100) may assign an index to each of the three coding units (1414a, 1414b, 1414c). The image decoding device (100) may compare the indexes for each coding unit to determine the middle coding unit among the coding units divided into an odd number of coding units. The image decoding device (100) may determine a coding unit (1414b) having an index corresponding to a middle value among the indices of the coding units as a coding unit at a middle position among the coding units determined by splitting the first coding unit (1410). According to an embodiment, when determining an index for distinguishing the split coding units, the image decoding device (100) may determine the index based on a size ratio between the coding units when the coding units do not have the same size. Referring to FIG. 14, the coding unit (1414b) generated by splitting the first coding unit (1410) may have the same width as other coding units (1414a, 1414c) but may be twice the height of the coding units (1414a, 1414c) that are different in height. In this case, if the index (PID) of the encoding unit (1414b) located in the middle is 1, the index of the encoding unit (1414c) located in the next order may be 3, which is an increase of 2.In cases like this where the index increases uniformly and then the increase amount changes, the image decoding device (100) may determine that the current encoding unit is divided into a plurality of encoding units including encoding units having different sizes from other encoding units. According to one embodiment, when the split shape 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 into a form in which an encoding unit at a predetermined position among the odd number of encoding units (for example, a middle encoding unit) has a different size from the other encoding units. In this case, the image decoding device (100) may determine a middle encoding unit having a different size using an index (PID) for the encoding unit. However, the above-described index, the size or position of the encoding unit at the predetermined position to be determined are specific for explaining one embodiment and should not be interpreted as being limited thereto, and it should be interpreted that various indexes, positions and sizes of encoding units can be used.
[0176] According to one embodiment, the image decoding device (100) may utilize a predetermined data unit from which recursive division of the encoding unit begins.
[0177] 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.
[0178] According to one embodiment, a predetermined data unit may be defined as a data unit from which a coding unit begins to be recursively split using split shape mode information. That is, it may correspond to a coding unit of the highest depth used in the process of determining multiple coding units for splitting the current picture. For convenience of explanation, this predetermined data unit will be referred to as a reference data unit hereinafter.
[0179] In one embodiment, the reference data unit may exhibit a predetermined size and shape. In one embodiment, the reference data unit may include MxN samples, where M and N may be the same and may be integers expressed as powers of 2. That is, the reference data unit may exhibit a square or non-square shape, and may be subsequently divided into an integer number of coding units.
[0180] According to one embodiment, the video decoding device (100) can divide the current picture into a plurality of reference data units. According to one embodiment, the video decoding device (100) can divide the plurality of reference data units into which the current picture is divided using division type mode information for each reference data unit. This division process of the reference data units can correspond to a division process using a quad-tree structure.
[0181] According to one embodiment, the image decoding device (100) may predetermine the minimum size that a reference data unit included in the current picture may have. Accordingly, the image decoding device (100) may determine reference data units of various sizes having a size greater than or equal to the minimum size, and may determine at least one encoding unit using segmentation mode information based on the determined reference data unit.
[0182] Referring to FIG. 15, the image decoding device (100) may use a reference coding unit (1500) having a square shape, or may use a reference coding unit (1502) having a non-square shape. According to one embodiment, the shape and size of the reference coding unit may be determined according to various data units (e.g., sequence, picture, slice, slice segment, tile, tile group, maximum coding unit, etc.) that may include at least one reference coding unit.
[0183] According to one embodiment, the bitstream acquisition unit (110) of the image decoding device (100) can acquire at least one of information on the shape of the reference coding unit and information on the size of the reference coding unit from the bitstream for each of the various data units. The process of determining at least one coding unit included in the square-shaped reference coding unit (1500) has been described above through the process of splitting the current coding unit (300) of FIG. 3, and the process of determining at least one coding unit included in the non-square-shaped reference coding unit (1502) has been described above through the process of splitting the current coding unit (400 or 450) of FIG. 4, so a detailed description thereof will be omitted.
[0184] According to one embodiment, the image decoding device (100) may use an index for identifying the size and shape of the reference coding unit to determine the size and shape of the reference coding unit according to some data units that are predetermined based on a predetermined condition. That is, the bitstream acquisition unit (110) may acquire only an index for identifying the size and shape of the reference coding unit for each slice, slice segment, tile, tile group, maximum coding unit, etc., among the various data units (e.g., sequences, pictures, slices, slice segments, tiles, tile groups, maximum coding units, etc.) that satisfy a predetermined condition (e.g., data units having a size smaller than a slice) from the bitstream. The image decoding device (100) may determine the size and shape of the reference data unit for each data unit that satisfies the predetermined condition by using the index. When information about the shape of the reference coding unit and information about the size of the reference coding unit are obtained from the bitstream for each relatively small-sized data unit and used, the efficiency of the bitstream may not be good. Therefore, instead of directly obtaining information about the shape of the reference coding unit and information about the size of the reference coding unit, only the index may be obtained and used. In this case, at least one of the size and shape of the reference coding unit corresponding to the index indicating the size and shape of the reference coding unit may be determined in advance. That is, the image decoding device (100) can determine at least one of the size and shape of the reference coding unit included in the data unit that serves as the basis for obtaining the index by selecting at least one of the sizes and shapes of the predetermined reference coding units according to the index.
[0185] According to one embodiment, the image decoding device (100) may use at least one reference coding unit included in one maximum coding unit (1510). That is, a maximum coding unit for dividing an image may include at least one reference coding unit, and a coding unit may be determined through a recursive splitting process of each reference coding unit. According to one embodiment, at least one of the width and the height of the maximum coding unit may correspond to an integer multiple of at least one of the width and the height of the reference coding unit. According to one embodiment, the size of the reference coding unit may be a size obtained by splitting the maximum coding unit n times according to a quad tree structure. That is, the image decoding device (100) may split the maximum coding unit n times according to the quad tree structure to determine the reference coding unit, and may split the reference coding unit based on at least one of block shape information and split shape mode information according to various embodiments.
[0186] According to one embodiment, the video decoding device (100) may obtain and use block shape information indicating the shape of the current encoding unit or split shape mode information indicating a method of splitting the current encoding unit from the bitstream. The split shape mode information may be included in a bitstream related to various data units. For example, the video decoding device (100) may use split shape 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 video decoding device (100) may obtain and use a syntax element corresponding to block shape information or split shape mode information from the bitstream for each maximum encoding unit and each reference encoding unit.
[0187] Hereinafter, a method for determining a partitioning rule according to one embodiment of the present disclosure will be described in detail.
[0188] The video decoding device (100) can determine a segmentation rule of the video. The segmentation rule may be predetermined between the video decoding device (100) and the video encoding device (200). The video decoding device (100) can determine the segmentation rule of the video based on information obtained from a bitstream. The video 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 video decoding device (100) can determine the segmentation rule differently according to a frame, a slice, a tile, a temporal layer, a maximum coding unit, or an coding unit.
[0189] The image decoding device (100) can determine a segmentation rule based on the block shape of the encoding unit. The block shape can include the size, shape, width and height ratio, and direction of the encoding unit. The image encoding device (200) and the image decoding device (100) can determine in advance that the segmentation rule will be determined based on the block shape of the encoding unit. However, the present invention is not limited thereto. The image decoding device (100) can determine the segmentation rule based on information obtained from the bitstream received from the image encoding device (200).
[0190] The shape of the encoding unit may include a square and a non-square shape. If the width and height of the encoding unit are equal, the image decoding device (100) may determine the shape of the encoding unit as a square. In addition, if the width and height of the encoding unit are not equal, the image decoding device (100) may determine the shape of the encoding unit as a non-square shape.
[0191] The size of the coding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256. The size of the coding unit may be classified according to the length of the long side, the length of the short side, or the area of the coding unit. The image decoding device (100) may apply the same splitting rule to the coding units classified into the same group. For example, the image decoding device (100) may classify the coding units having the same long side length into the same size. In addition, the image decoding device (100) may apply the same splitting rule to the coding units having the same long side length.
[0192] The ratio of the width to the height of the coding 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. In addition, the direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the length of the width of the coding unit is longer than the length of the height. The vertical direction may indicate a case where the length of the width of the coding unit is shorter than the length of the height.
[0193] The image decoding device (100) can adaptively determine a splitting rule based on the size of the encoding unit. The image decoding device (100) can determine a different allowable splitting mode based on the size of the encoding unit. For example, the image decoding device (100) can determine whether splitting is allowed based on the size of the encoding unit. The image decoding device (100) can determine a splitting direction based on the size of the encoding unit. The image decoding device (100) can determine an allowable splitting type based on the size of the encoding unit.
[0194] Determining the splitting rule based on the size of the encoding unit may be a splitting rule predetermined between the image encoding device (200) and the image decoding device (100). In addition, the image decoding device (100) may determine the splitting rule based on information obtained from the bitstream.
[0195] The image decoding device (100) can adaptively determine a segmentation rule based on the position of the encoding unit. The image decoding device (100) can adaptively determine a segmentation rule based on the position that the encoding unit occupies in the image.
[0196] Additionally, the image decoding device (100) can determine a splitting rule so that encoding units generated through different splitting paths do not have the same block shape. However, this is not limited thereto, and encoding units generated through different splitting paths may have the same block shape. Encoding units generated through different splitting paths may have different decoding processing orders. Since the decoding processing order has been described together with FIG. 12, a detailed description thereof will be omitted.
[0197] FIG. 16 illustrates encoding units that can be determined for each picture when the combination of forms into which encoding units can be divided is different for each picture according to one embodiment.
[0198] Referring to FIG. 16, the image decoding device (100) can determine a different combination of partitioning shapes into which encoding units can be partitioned for each picture. For example, the image decoding device (100) can decode an image using a picture (1600) that can be partitioned into four encoding units, a picture (1610) that can be partitioned into two or four encoding units, and a picture (1620) that can be partitioned into two, three, or four encoding units, among at least one picture included in the image. The image decoding device (100) can only use partitioning shape information indicating that the picture (1600) is partitioned into four square encoding units to partition the picture (1600) into a plurality of encoding units. The image decoding device (100) can only use partitioning shape information indicating that the picture (1610) is partitioned into two or four encoding units to partition the picture. The video decoding device (100) can only use the segmentation type information indicating that the picture (1620) is segmented into two, three, or four encoding units. The above-described combination of segmentation types is merely an example for explaining the operation of the video decoding device (100), and therefore the above-described combination of segmentation types should not be interpreted as being limited to the above-described example, but should be interpreted as being capable of using various combinations of segmentation types for each predetermined data unit.
[0199] According to one embodiment, the bitstream acquisition unit (110) of the image decoding device (100) can acquire a bitstream including an index indicating a combination of segmentation type information for each predetermined data unit (e.g., sequence, picture, slice, slice segment, tile, tile group, etc.). For example, the bitstream acquisition unit (110) can acquire an index indicating a combination of segmentation type 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) can determine a combination of segmentation types into which an encoding unit can be divided for each predetermined data unit using the acquired index, and thus can use different combinations of segmentation types for each predetermined data unit.
[0200] FIG. 17 illustrates various forms of encoding units that can be determined based on segmentation mode information that can be expressed in binary code according to one embodiment.
[0201] According to one embodiment, the image decoding device (100) can split an encoding unit into various shapes using block shape information and split shape mode information acquired through the bitstream acquisition unit (110). The shapes of the encoding unit that can be split may correspond to various shapes including the shapes described through the above-described embodiments.
[0202] Referring to FIG. 17, the image decoding device (100) can split a square-shaped encoding unit in at least one of the horizontal direction and the vertical direction based on the split shape mode information, and can split a non-square-shaped encoding unit in the horizontal direction or the vertical direction.
[0203] According to one embodiment, when the image decoding device (100) can divide a square-shaped encoding unit into four square encoding units by horizontally and vertically splitting the encoding unit, there may be four types of splitting modes that the splitting mode information for the square encoding unit can indicate. According to one embodiment, the splitting mode information may be expressed as a two-digit binary code, and a binary code may be assigned to each splitting mode. For example, when the encoding unit is not split, the splitting mode information may be expressed as (00)b, when the encoding unit is split in the horizontal direction and the vertical direction, the splitting mode information may be expressed as (01)b, when the encoding unit is split in the horizontal direction, the splitting mode information may be expressed as (10)b, and when the encoding unit is split in the vertical direction, the splitting mode information may be expressed as (11)b.
[0204] According to one embodiment, when the image decoding device (100) splits a non-square coding unit in a horizontal direction or a vertical direction, the type of split shape that the split shape mode information can indicate may be determined depending on the number of coding units into which the coding unit is split. Referring to FIG. 17, the image decoding device (100) may split a non-square coding unit into up to three according to one embodiment. The image decoding device (100) may split the coding unit into two coding units, in which case the split shape mode information may be expressed as (10)b. The image decoding device (100) may split the coding unit into three coding units, in which case the split shape mode information may be expressed as (11)b. The image decoding device (100) may determine not to split the coding unit, in which case the split shape 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 a binary code representing segmentation mode information.
[0205] According to one embodiment, referring to FIG. 17, the binary code of the partition shape mode information indicating that the coding unit is not split may be expressed as (0)b. If the binary code of the partition shape mode information indicating that the coding unit is not split is set to (00)b, all binary codes of the 2-bit partition shape mode information must be used even if there is no partition shape mode information set to (01)b. However, as illustrated in FIG. 17, if three partition shapes for a non-square coding unit are used, the image decoding device (100) can determine that the coding unit is not split even if it uses a 1-bit binary code (0)b as the partition shape mode information, and thus can efficiently use the bitstream. However, the partition shapes of the non-square coding unit indicated by the partition shape mode information should not be interpreted as being limited to only the three shapes illustrated in FIG. 17, but should be interpreted as various shapes including the above-described embodiments.
[0206] FIG. 18 illustrates another form of a coding unit that can be determined based on segmentation mode information that can be expressed in binary code according to one embodiment.
[0207] Referring to FIG. 18, the image decoding device (100) can split a square-shaped encoding unit in the horizontal direction or the vertical direction based on the split shape mode information, and can split a non-square-shaped encoding unit in the horizontal direction or the vertical direction. That is, the split shape mode information can indicate that a square-shaped encoding unit is split in one direction. In this case, the binary code of the split shape mode information indicating that a square-shaped encoding unit is not split can be expressed as (0)b. If the binary code of the split shape mode information indicating that the encoding unit is not split is set to (00)b, all binary codes of the 2-bit split shape mode information must be used even though there is no split shape mode information set to (01)b. However, as illustrated in FIG. 18, if three types of 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 it uses a 1-bit binary code (0)b as the division form mode information, and thus can efficiently use the bitstream. However, the division forms of the square-shaped encoding unit indicated by the division form mode information should not be interpreted as being limited to only the three types illustrated in FIG. 18, but should be interpreted as various types including the embodiments described above.
[0208] In one embodiment, block shape information or segmentation shape mode information may be expressed using binary code, and such information may be directly generated as a bitstream. Furthermore, block shape information or segmentation shape mode information that may be expressed using binary code may not be directly generated as a bitstream, but may instead be used as a binary code input into CABAC (context adaptive binary arithmetic coding).
[0209] According to one embodiment, the image decoding device (100) describes a process of obtaining syntax for block shape information or segmentation shape mode information through CABAC. A bitstream including a binary code for the syntax can be obtained through a bitstream obtaining unit (110). The image decoding device (100) can detect a syntax element indicating block shape information or segmentation shape mode information by de-binarizing a bin string included in the obtained bitstream. According to one embodiment, the image decoding device (100) can obtain a set of binary bin strings corresponding to syntax elements to be decoded, and decode each bin using probability information, and the image decoding device (100) can repeat the process until a bin string composed of the decoded bins becomes equal to one of the previously obtained bin strings. The image decoding device (100) can determine syntax elements by performing inverse binarization of an empty string.
[0210] According to one embodiment, the image decoding device (100) may perform a decoding process of adaptive binary arithmetic coding to determine a syntax for a bin string, and the image decoding device (100) may update a probability model for bins acquired through the bitstream acquisition unit (110). Referring to FIG. 17, the bitstream acquisition unit (110) of the image decoding device (100) may acquire a bitstream representing a binary code representing segmentation mode information according to one embodiment. Using the acquired binary code having a size of 1 or 2 bits, the image decoding device (100) may determine a syntax for the segmentation mode information. In order to determine the syntax for the segmentation mode information, the image decoding device (100) may update a 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 among the 2-bit binary codes is 0 or 1.
[0211] According to one embodiment, the image decoding device (100) may, in the process of determining the syntax, update the probability for the bins used in the process of decoding the bins of the empty string for the syntax, and the image decoding device (100) may determine that certain bits among the empty strings have the same probability without updating the probability.
[0212] Referring to FIG. 17, in the process of determining a syntax using an empty string indicating split shape mode information for a non-square coding unit, the image decoding device (100) may determine the syntax for the split shape mode information using one bin having a value of 0 when the non-square coding unit is not split. That is, when the block shape information indicates that the current coding unit is a non-square shape, the first bin of the empty string for the split shape mode information may be 0 when the non-square coding unit is not split, and may be 1 when it is split into 2 or 3 coding units. Accordingly, the probability that the first bin of the empty string of the split shape mode information for the non-square coding unit is 0 may be 1 / 3, and the probability that it is 1 may be 2 / 3. As described above, the image decoding device (100) can only express a 1-bit empty string having a value of 0 for the partition shape mode information indicating that a non-square-shaped encoding unit is not partitioned, so the image decoding device (100) can determine the syntax for the partition shape mode information by determining whether the second bin is 0 or 1 only when the first bin of the partition shape mode information is 1. According to one embodiment, the image decoding device (100) can decode the bin by considering that the probability that the second bin is 0 or 1 when the first bin for the partition shape mode information is 1 is the same probability.
[0213] According to one embodiment, the image decoding device (100) may use various probabilities for each bin in the process of determining a bin of a bin string for the partition shape mode information. According to one embodiment, the image decoding device (100) may determine the probability of a bin for the partition shape mode information differently depending on the direction of a non-square block. According to one embodiment, the image decoding device (100) may determine the probability of a bin for the partition shape mode information differently depending on the area 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 a bin for the partition shape mode information differently depending on at least one of the shape and the length of the long side of the current encoding unit.
[0214] According to one embodiment, the image decoding device (100) may determine that the bin probability for the segmentation shape mode information is the same for encoding units of a predetermined size or larger. For example, the bin probability for the segmentation shape mode information may be determined to be the same for encoding units of a size of 64 samples or larger based on the length of the long side of the encoding unit.
[0215] According to one embodiment, the image decoding device (100) may determine the initial probability for bins constituting the empty string of the segmentation shape mode information based on the slice type (e.g., I slice, P slice, or B slice).
[0216] Figure 19 is a block diagram of an image encoding and decoding system that performs loop filtering.
[0217] The encoding unit (1910) of the image encoding and decoding system (1900) transmits an encoded bitstream of an image, and the decoding unit (1950) receives the bitstream and decodes it to output a restored image. Here, the encoding unit (1910) may have a configuration similar to that of the image encoding device (200) described below, and the decoding unit (1950) may have a configuration similar to that of the image decoding device (100).
[0218] 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 as spatial domain data through the inverse quantization and inverse transformation unit (1930), and the restored spatial domain data are output as a restored image through the in-loop filtering unit (1940). The restored image can be used as a reference image for the next input image through the prediction encoding unit (1915).
[0219] Encoded image data among the bitstreams received by the decoding unit (1950) is restored to residual data in the spatial domain through the entropy decoding unit (1955) and the inverse quantization and inverse transformation unit (1960). The prediction data and residual data output from the prediction decoding unit (1975) are combined to form image data in the spatial domain, and the in-loop filtering unit (1970) can perform filtering on the image data in the spatial domain 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).
[0220] The in-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) together with the encoded image data. The in-loop filtering unit (1970) of the decoding unit (1950) can perform loop filtering based on the filter information input from the decoding unit (1950).
[0221] The various embodiments described above describe operations related to the image decoding method performed by the image decoding device (100). Hereinafter, the operations of the image encoding device (200), which performs the image encoding method corresponding to the reverse process of the image decoding method, will be described through various embodiments.
[0222] 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 segmentation shape mode information according to one embodiment.
[0223] 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 image and encode the input image. The encoding unit (220) may encode the input image 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 a shape, a direction, a ratio of width and height, or a size of an encoding unit.
[0224] The bitstream generation unit (210) can generate a bitstream based on an encoded input image. For example, the bitstream generation unit (210) can generate a bitstream by entropy encoding syntax elements based on a context model. In addition, the image encoding device (200) can transmit the bitstream to the image decoding device (100).
[0225] According to one embodiment, the encoding unit (220) of the image encoding device (200) can determine the shape of an encoding unit. For example, the encoding unit may be square or have a non-square shape, and information indicating such shape may be included in the block shape information.
[0226] According to one embodiment, the encoding unit (220) can determine the shape into which the encoding unit is to be split. The encoding unit (220) can determine the shape of at least one encoding unit included in the encoding unit, and the bitstream generation unit (210) can generate a bitstream including split shape mode information including information about the shape of such encoding unit.
[0227] According to one embodiment, the encoder (220) may determine whether the encoding unit is split or not. If the encoder (220) determines that the encoding unit includes only one encoding unit or that the encoding unit is not split, the bitstream generation unit (210) may generate a bitstream including split shape mode information indicating that the encoding unit is not split. In addition, the encoder (220) may split the encoding unit into a plurality of encoding units, and the bitstream generation unit (210) may generate a bitstream including split shape mode information indicating that the encoding unit is split into a plurality of encoding units.
[0228] According to one embodiment, information indicating the number of encoding units to be split into or the direction in which the encoding unit is to be split may be included in the splitting mode information. For example, the splitting mode information may indicate splitting in at least one of the vertical and horizontal directions, or may indicate no splitting.
[0229] The video encoding device (200) determines information about the segmentation shape mode based on the segmentation shape mode of the encoding unit. The video encoding device (200) determines a context model based on at least one of the shape, direction, width, and height ratio or size of the encoding unit. Then, the video encoding device (200) generates information about the segmentation shape mode for segmenting the encoding unit based on the context model as a bitstream.
[0230] In order to determine a context model, the video encoding device (200) may obtain an array for matching at least one of the shape, direction, width and height ratio or size of the encoding unit with an index for the context model. The video encoding device (200) may obtain an index for the context model based on at least one of the shape, direction, width and height ratio or size of the encoding unit in the array. The video encoding device (200) may determine the context model based on the index for the context model.
[0231] The video encoding device (200) may further determine the context model based on block shape information including at least one of the shape, direction, width, and height ratio or size of a neighboring encoding unit adjacent to the encoding unit, in order to determine the context model. In addition, the neighboring encoding unit may include at least one of encoding units located on the lower left, left, upper left, upper right, right, or lower right of the encoding unit.
[0232] In addition, the video encoding device (200) may compare the length of the width of the upper peripheral encoding unit with the length of the width of the encoding unit to determine the context model. In addition, the video encoding device (200) may compare the length of the height of the left and right peripheral encoding units with the length of the height of the encoding unit. In addition, the video encoding device (200) may determine the context model based on the comparison results.
[0233] Since the operation of the video encoding device (200) includes similar contents to the operation of the video decoding device (100) described in FIGS. 3 to 19, a detailed description is omitted.
[0234] In one embodiment of the present disclosure, the APS filter set may include a current APS filter set or a previous APS filter set. The APS filter set may be a filter set obtained or derived for each slice from a slice header or an adaptive parameter set (APS). In addition, at least one APS filter set may be obtained or derived for each slice.
[0235] In one embodiment of the present disclosure, the current APS filter set may represent a set of filters acquired or derived from a slice header for the current slice for filtering blocks included in the current slice. For example, the image decoding device may acquire or derive four APS filter sets for filtering blocks included in the current slice. Meanwhile, the number of APS filter sets for filtering blocks included in the current slice is not limited to the disclosed example and may be less than or more than four.
[0236] In one embodiment of the present disclosure, the previous APS filter set may represent a filter set obtained or derived from a slice header for a previous slice for filtering blocks included in a current slice. For example, the image decoding device may obtain or derive at least one filter set from a slice header for a previous slice for filtering blocks included in the previous slice. The image decoding device may use the filter sets obtained from the slice header for the previous slice for filtering blocks included in the current slice. Meanwhile, the previous slice may be a previously decoded slice of the current image or a slice included in a previously decoded image.
[0237] FIG. 20 is a block diagram illustrating the configuration of an image decoding device (2000) according to one embodiment.
[0238] Referring to FIG. 20, the image decoding device (2000) may include an acquisition unit (2010) and a prediction decoding unit (2030). The acquisition unit (2010) illustrated in FIG. 20 may correspond to the bitstream acquisition unit (110) illustrated in FIG. 1, and the prediction decoding unit (2030) may correspond to the decoding unit (120) illustrated in FIG. 1. In addition, the acquisition unit (2010) may correspond to the entropy decoding unit (1955) illustrated in FIG. 19, and the prediction decoding unit (2030) may correspond to the prediction decoding unit (1975) illustrated in FIG. 19.
[0239] In one embodiment, the acquisition unit (2010) and the prediction decoding unit (2030) may be implemented with at least one processor. In one embodiment, the acquisition unit (2010) and the prediction decoding unit (2030) may operate according to instructions stored in memory.
[0240] In one embodiment, the image decoding device (2000) may include a memory that stores input / output data of the acquisition unit (2010) and the prediction decoding unit (2030). In addition, the image decoding device (2000) may include a memory control unit that controls data input / output of the memory.
[0241] In one embodiment, the acquisition unit (2010) can acquire a bitstream generated as a result of encoding an image.
[0242] In one embodiment, the bitstream may include an encoding result for a current block. The bitstream may include information used to reconstruct the current block. The current block may be a maximum coding unit, an encoding unit, a transformation unit, a prediction unit, or a filtering unit segmented from a current image to be decoded. In addition, the current block may be a block at a predetermined position being processed in a currently performed encoding or decoding operation. The current sample of the block may be any sample included in the current block.
[0243] In one embodiment, the prediction decoding unit (2150) can determine the current block based on block shape information and / or information about a segmentation shape mode included in a bitstream corresponding to at least one level of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, and a slice segment header.
[0244] In one embodiment, the acquisition unit (2010) can receive a bitstream from an image encoding device over a network.
[0245] In one embodiment, the acquisition unit (2010) may acquire a bitstream from a data storage medium including a magnetic medium such as a hard disk, a floppy disk, and a magnetic tape, an optical recording medium such as a CD-ROM and a DVD, a magneto-optical medium such as a floptical disk, and the like.
[0246] In one embodiment, the acquisition unit (2010) may acquire syntax elements for decoding an image from a bitstream. Values corresponding to the syntax elements may be included in the bitstream according to the hierarchical structure of the image.
[0247] In one embodiment, the acquisition unit (2010) may perform entropy decoding on the bitstream to obtain bins corresponding to syntax elements.
[0248] In one embodiment, the prediction decoding unit (2030) can obtain information about adaptive loop filtering from a bitstream. The information about adaptive loop filtering can also be obtained as a syntax element. The prediction decoding unit (2030) can obtain all or part of the information about adaptive loop filtering from at least one of a sequence parameter set, a picture parameter set, an adaptive parameter set, a slice header, and slice data of the bitstream. The information about adaptive loop filtering can include at least one of information indicating whether to perform adaptive loop filtering, information about whether to use an APS filter set, a filter set index, information about whether to obtain a current APS filter set, an APS index, information about the number of filters included in each of the current APS filter sets included in the APS filter set, and information about at least one APS filter included in the current APS filter set (e.g., APS filter coefficients, classifier information, etc.).
[0249] Meanwhile, the APS filter may be referred to as an adaptive filter. Furthermore, the APS filter set may be referred to as an adaptive filter set. Furthermore, the APS filter coefficients may be referred to as adaptive filter coefficients.
[0250] For example, information about adaptive loop filtering obtained from a sequence parameter set may be information about an APS filter to be applied to the current sequence. Information about adaptive loop filtering obtained from a picture parameter set may be information about an APS filter to be applied to the current picture. Information about adaptive loop filtering obtained from a slice header or slice data may be information about an APS filter to be applied to the current slice.
[0251] Meanwhile, the adaptive loop filter may be a filter that uses one of at least one predefined filter set, at least one previous APS filter set, and at least one current APS filter set. The previous APS filter may be a filter included in the current APS filter set included in information about adaptive loop filtering acquired for a data unit decoded before the current block. Information about adaptive loop filtering for a previously decoded data unit may be used as information about the previous APS filter. The adaptive loop filtering may include at least one of filtering using a predefined filter set (e.g., first filtering, second filtering, or third filtering) and APS filtering.
[0252] In one embodiment, the predictive decoding unit (2030) may obtain information on whether to utilize an APS filter set based on information indicating whether to perform adaptive loop filtering. For example, if the predictive decoding unit (2030) determines to perform adaptive loop filtering, it may obtain information on whether to utilize an APS filter set.
[0253] In one embodiment, the prediction decoding unit (2030) may obtain at least one of a filter set index, information on whether to acquire the current APS filter set, and an APS index based on information indicating whether to use an APS filter set. For example, if the prediction decoding unit (2030) determines not to use an APS filter set, it may obtain a filter set index. If the prediction decoding unit (2030) determines to use an APS filter set, it may obtain information on whether to acquire the current APS filter set and an APS index.
[0254] In one embodiment, the prediction decoding unit (2030) may obtain information about the number of filters included in each of the current APS filter sets included in the APS filter set and information about at least one APS filter included in the current APS filter set based on information about whether to obtain the current APS filter set. For example, if the prediction decoding unit (2030) determines to obtain the current APS filter set, it may obtain information about the number of filters included in each of the current APS filter sets included in the APS filter set and information about at least one APS filter included in the current APS filter set.
[0255] In one embodiment, the prediction decoding unit (2030) may perform filtering using the predefined filter set for the current block based on at least one predefined filter set and a filter set index. For example, the prediction decoding unit (2030) may store a filter set including at least one filter derived from learned data in the memory. The prediction decoding unit (2030) may store at least one filter set in the memory. This will be described in detail below with reference to FIG. 24. Hereinafter, the predefined filter may be referred to as a fixed filter. Additionally, the predefined filter set may be referred to as a fixed filter set. The filter set index may be referred to as a fixed filter index or a fixed index.
[0256] In one embodiment, the prediction decoding unit (2030) can perform first filtering on the current block using the reconstruction block, the intermediate filtered block for the current block, and the first filter. The prediction decoding unit (2030) can obtain a first filtered block including a first filtered sample corresponding to the current sample by performing the first filtering using the reconstruction block, the intermediate filtered block, and the first filter. The prediction decoding unit (2030) can obtain a first filtered sample corresponding to the current sample by performing filtering using the intermediate filtered sample for the current sample and the first filter.
[0257] In one embodiment, the prediction decoding unit (2030) can obtain a second filtered sample corresponding to the current sample by performing second filtering using the reconstruction block, the first filtered block, and the second filter. The prediction decoding unit (2030) can obtain a second filtered block including the second filtered sample corresponding to the current sample by performing second filtering using the reconstruction block, the first filtered block, and the second filter. The prediction decoding unit (2030) can obtain a filtered sample corresponding to the current sample by performing filtering using the first filtered sample and the second filter.
[0258] In one embodiment, the prediction decoding unit (2030) can obtain a third filtered block including a third filtered sample corresponding to the current sample by performing third filtering using the restoration block and the third filter. The prediction decoding unit (2030) can obtain a third filtered sample corresponding to the current sample by performing filtering using the restoration sample and the third filter.
[0259] In one embodiment, the prediction decoding unit (2030) may perform APS filtering using at least one of an intermediate filtered block, a first filtered block, a second filtered block, a third filtered block, a reconstruction block, a residual block, a first filtered residual block, a second filtered residual block, a third filtered residual block, a third filtered intermediate filtered block, and a difference block, and at least one of information about adaptive loop filtering. The prediction decoding unit (2030) may perform adaptive loop filtering using at least one of an intermediate filtered block, a first filtered block, a second filtered block, a third filtered block, a reconstruction block, a residual block, a first filtered residual block, and an adaptive filter.
[0260] In one embodiment, the prediction decoding unit (2030) can perform adaptive loop filtering based on at least one of a restored sample, a first filtered sample, a second filtered sample, a third filtered sample, an intermediate filtered sample, a residual sample, a first filtered residual sample, a second filtered residual sample, a third filtered residual sample, a third filtered intermediate filtered sample, and a difference sample and information about the adaptive loop filtering.
[0261] In one embodiment, the prediction decoding unit (2030) comprises: at least one sample among the reconstructed sample and the surrounding samples of the reconstructed sample, at least one sample among the first filtered sample and the surrounding samples of the first filtered sample, at least one sample among the second filtered sample and the surrounding samples of the second filtered sample, at least one sample among the third filtered sample and the surrounding samples of the third filtered sample, at least one sample among the intermediate filtered sample and the surrounding samples of the intermediate filtered sample, a residual sample and the surrounding samples of the residual sample, at least one sample among the first filtered residual sample and the surrounding samples of the first filtered residual samples, at least one sample among the second filtered residual sample and the surrounding samples of the second filtered residual sample, at least one sample among the third filtered residual sample and the surrounding samples of the third filtered residual sample, and at least one sample among the third filtered intermediate filtered sample and the surrounding samples of the third filtered intermediate filtered sample, a difference sample and the surrounding samples of the difference sample, and an adaptive loop. Filtering can be performed based on information about filtering.
[0262] Hereinafter, various methods for performing adaptive loop filtering in the present disclosure will be described in detail.
[0263] In one embodiment, the image decoding device (2000) can obtain a filtered block by performing adaptive loop filtering on the current block. The image decoding device (2000) can obtain a filtered block that has been adaptively loop filtered by performing APS filtering or filtering using a predefined filter set on the current block using an APS filter or a predefined filter. The filtered block can include an adaptive loop filtered sample.
[0264] Hereinafter, in the present disclosure, a specific description of an operation for performing adaptive loop filtering will be described later with reference to FIGS. 21 to 33.
[0265] FIG. 21 is a diagram illustrating an in-loop filtering operation according to one embodiment.
[0266] In one embodiment, the in-loop filtering unit of the video encoding device or the in-loop filtering unit of the video decoding device (2000) (hereinafter, the in-loop filtering unit (2100)) can perform at least one of deblocking filtering (2110), sample adaptive offset filtering (2120), and adaptive loop filtering (2130).
[0267] In one embodiment, deblocking filtering (2110) may be filtering applied to the boundary of a transform block using a deblocking filter to reduce blocking artifacts that occur during the process of performing the transformation, prediction, and quantization processes.
[0268] In one embodiment, the filter length for deblocking filtering (2110) may be determined based on the size of the minimum transform block on both sides or the image components. A 4-tap, 8-tap, or 14-tap filter may be applied to a transform block for luma samples, and a 6-tap filter may be applied to a transform block for chroma samples. Meanwhile, the size or length of the taps used for deblocking filtering (2110) is not limited to the disclosed example.
[0269] In one embodiment, the filter length for deblocking filtering (2110) may be determined according to the smoothness or boundary conditions of the boundaries between transform blocks. For example, when performing filtering on image data, the image decoding device (2000) may identify an area including high variance samples as an edge and not perform deblocking filtering in order to prevent the edges of objects from being blurred. The image decoding device (2000) may calculate the smoothness within the image data or determine whether a boundary condition is satisfied, and filter the boundary of the transform block only when the boundary of the transform block is determined to be flat. The boundary conditions may vary depending on whether the boundary is a vertical boundary or a horizontal boundary and whether the transform block is for a luma sample or a chroma sample. The image decoding device (2000) may obtain information associated with the boundary conditions from the bitstream, and the boundary conditions may be preset. In addition, filter coefficients associated with the deblocking filtering (2110) may be preset.
[0270] In one embodiment, sample adaptive offset filtering (2120) may be a filtering method that classifies samples of neighboring blocks and utilizes offsets for the classified samples to reduce ringing artifacts. For example, sample adaptive offset filtering (2120) may be a filtering method that reduces errors between a restored image and an original image by adding an offset to at least one sample included in an image on which deblocking filtering has been performed.
[0271] In one embodiment, sample adaptive offset filtering (2120) may determine sample characteristics within a block by either not using sample adaptive offset filtering, performing edge offset filtering, or performing band offset filtering.
[0272] In one embodiment, edge offset filtering is filtering performed when it is identified that a block has an edge in a specific direction and that errors exist for samples in the edge direction. For edge offset filtering, the image decoding device (2000) may obtain a class corresponding to the block and four edge offset values and perform edge offset filtering on the block.
[0273] In one embodiment, band offset filtering is a filtering method that classifies samples within a block into brightness bands having similar brightness values and performs the filtering using offsets for multiple consecutive bands. The image decoding device (2000) may perform band offset filtering by obtaining information about the start section of a band and an offset value for each of the multiple bands to obtain information about the multiple bands.
[0274] In one embodiment, the image decoding device (2000) may perform sample adaptive offset filtering on a current block using information regarding sample adaptive offset filtering on surrounding blocks. For example, the image decoding device (2000) may perform sample adaptive offset filtering on a current block using information regarding sample adaptive offset filtering on an upper block or a left block.
[0275] In one embodiment, the adaptive loop filtering (2130) may be filtering applied to the current block using a filter adaptively determined or obtained based on the characteristics of the current block. The adaptive loop filtering (2130) may be filtering performed using a filter determined based on at least one of a predefined filter set, at least one APS filter set obtained from an adaptive parameter set, and at least one class of the current block. Meanwhile, the operation of obtaining the filter set may include the operation of obtaining filter coefficients for each of a plurality of filters for the adaptive loop filtering (2130) of the current block. In addition, the operation of obtaining the filter may include the operation of obtaining at least one filter coefficient for the filter.
[0276] In one embodiment, the video decoding device (2000) may perform adaptive loop filtering (2130) using a 7X7 filter, which is a 7X7 diamond-shaped filter, for the luma component of the current sample included in the current block, and using a 5X5 filter, which is a 5X5 diamond-shaped filter, for the chroma component. The adaptive loop filtering (2130) may include first filtering (2160) or APS filtering (2180).
[0277] Hereinafter, the shape (or tap) of the filter used to perform adaptive loop filtering (2130) according to one embodiment will be described in detail in FIG. 22, FIG. 23, or FIG. 25. Meanwhile, the shape, size, and type of block of the filter used to perform adaptive loop filtering (2130) are not limited to the disclosed example.
[0278] In one embodiment, the image decoding device (3200) may determine the class of the current block as one of a plurality of classes based on characteristics such as directionality and activity of samples within the current block. Characteristics such as directionality and activity of samples within the current block may be determined using a gradient for the current block. For example, the directionality of the current block included in the current image may be determined as one of five directionality by calculating horizontal, vertical, and diagonal gradients from samples included in the current block and surrounding samples of the current block. In addition, the activity of the current block may be determined as one of five activityality using the gradient calculated for directionality classification. Since the class of the current block may be determined using five directionality and five activity, it may be determined as one of 25 classes.
[0279] Meanwhile, the number of directions, activities, and classes are not limited to the disclosed examples. The method for determining the class of the current block is described in detail in Fig. 22.
[0280] In one embodiment, the video decoding device (2000) can obtain information about adaptive loop filtering from a bitstream. The video decoding device (2000) can obtain information about adaptive loop filtering from a slice header, slice data, or an adaptive parameter set. The information about adaptive loop filtering can include information indicating whether to perform adaptive loop filtering, information (2140) about whether to use an APS filter set, and at least one of at least one APS filter set.
[0281] In one embodiment, the image decoding device (2000) can obtain information indicating whether to perform adaptive loop filtering included in information about adaptive loop filtering.
[0282] In one embodiment, the image decoding device (2000) can obtain information (2140) on whether to use an APS filter set. For example, the image decoding device (2000) can obtain an index indicating whether to use an APS filter set as information (2140) on whether to use an APS filter set.
[0283] In one embodiment, the image decoding device (2000) may determine to perform adaptive loop filtering (2130) for the current block without using the APS filter set based on information (2140) on whether to use the APS filter set. For example, if the image decoding device (2000) determines not to use the APS filter set, it may perform first filtering (2160) using at least one predefined filter set. The at least one predefined filter set may be stored in the memory of the image decoding device (2000).
[0284] In one embodiment, the image decoding device (2000), if it is determined not to use an APS filter set, may obtain a filter set index indicating one of at least one predefined filter set. The image decoding device (2000) may determine a first filter for the current block based on the filter set index and the class. The image decoding device (2000) may identify or obtain filter coefficients for the first filter determined based on the filter set index and the class.
[0285] For example, the number of predefined filters may be 64, and the number of predefined filter sets may be 16. Additionally, each filter set may contain information about filters corresponding to each of the 25 classes.
[0286] In one embodiment, the image decoding device (2000) can obtain filter coefficients for the first filter by inputting a filter set index and a current block to the first classifier (2150). The first classifier (2150) can determine the first filter based on a class determined according to the filter set index and the characteristics of the current block. The image decoding device (2000) can obtain filter coefficients for the first filter output by the first classifier (2150). The current block may be a block having a size of 2X2 or 4X4. Meanwhile, the number of predefined filters, the number of predefined filter sets, and the size of the current block, which is a unit in which filtering is performed, are not limited to the disclosed example.
[0287] In one embodiment, the image decoding device (2000) can perform first filtering (2160) on an intermediate filtered block for a current block using filter coefficients for the first filter. The image decoding device (2000) can obtain a filtered block by performing the first filtering (2160) on the intermediate filtered block. The image decoding device (2000) can obtain the first filtered block obtained by performing the first filtering (2160) on the intermediate filtered block as a filtered block.
[0288] In one embodiment, the image decoding device (2000) may perform the first filtering (2160) on the current block by performing the first filtering on at least one sample or all samples included in the intermediate filtered block. For example, the image decoding device (2000) may perform the filtering on the intermediate filtered sample corresponding to the current sample by adding the values obtained by multiplying each of the first filter coefficients corresponding to the difference between the surrounding samples of the intermediate filtered sample included in the intermediate filtered block and the intermediate filtered block using the first filter tap for the first filtering (2160). In addition, the image decoding device (2000) may perform the first filtering (2160) on the current block by performing the filtering on the intermediate filtered sample on at least one sample or all samples included in the intermediate filtered block.
[0289] Meanwhile, the intermediate filtered block may represent a block on which at least one of deblocking filtering, sample adaptive offset filtering, and bidirectional filtering has been performed. Furthermore, the intermediate filtered block may represent a reconstructed block if it is determined that deblocking filtering, sample adaptive offset filtering, and bidirectional filtering have not been performed.
[0290] In one embodiment, the image decoding device (2000) may determine to perform adaptive loop filtering (2130) using the APS filter set based on information (2140) on whether to use the APS filter set.
[0291] In one embodiment, when the image decoding device (2000) determines to perform adaptive loop filtering (2130) using an APS filter set, it may obtain information on whether to acquire a current APS filter set. The image decoding device (2000) may obtain a current APS filter set based on the information on whether to acquire a current APS filter set. When the image decoding device (2000) determines to acquire a current APS filter set, it may obtain an APS index indicating one filter set among at least one current APS filter set and at least one previous APS filter set. In the present disclosure, the APS index may be an index indicating a filter set including a filter to be applied to a current block among at least one APS filter set.
[0292] In one embodiment, the video decoding device (2000) may not acquire the current APS filter set based on information on whether to acquire the current APS filter set. If the video decoding device (2000) determines not to acquire the current APS filter set, the video decoding device (2000) may acquire an APS index indicating one filter set from at least one previous APS filter set. In one embodiment, the video decoding device (2000) may acquire the APS index from a slice header, slice data, or an adaptive parameter set.
[0293] In one embodiment, the image decoding device (2000) may perform APS filtering (2180) based on an APS index. The image decoding device (2000) may obtain an APS filter of the current block using the APS filter set indicated by the APS index and the class of the current block. The image decoding device (2000) may perform APS filtering (2180) on the current block using the APS filter.
[0294] For example, the image decoding device (2000) can obtain four current APS filter sets and two previous APS filter sets as APS filter sets for the current slice. Each APS filter set can include information on filters corresponding to up to 25 classes. The image decoding device (2000) can obtain an APS index having one of the index values from 0 to 5 corresponding to each of the four current APS filter sets and the two previous APS filter sets. Meanwhile, the number of current APS filter sets and the number of previous APS filter sets are not limited to the disclosed example.
[0295] In one embodiment, the image decoding device (2000) can obtain filter coefficients for an APS filter by inputting an APS index and a current block to a second classifier (2170). The second classifier (2170) can determine an APS filter based on a class determined according to the characteristics of the APS index and the current block. The image decoding device (2000) can obtain filter coefficients for the APS filter output by the second classifier (2170). Hereinafter, in the present disclosure, obtaining a filter from a classifier may include obtaining filter coefficients for each filter. In addition, in the present disclosure, using each filter may include using filter coefficients for each filter.
[0296] In one embodiment, the image decoding device (2000) can perform APS filtering (2180) on an intermediate filtered block using filter coefficients for the APS filter. The image decoding device (2000) can obtain a filtered block by performing APS filtering (2180) on the intermediate filtered block. The image decoding device (2000) can obtain the APS filtered block obtained by performing APS filtering (2180) on the intermediate filtered block as a filtered block.
[0297] Meanwhile, the operation of performing a predetermined filtering on a given block may include an operation of performing a predetermined filtering using a sample value included in the given block. Furthermore, the operation of performing a filtering on a given sample using a predetermined filter may include an operation of performing a filtering using the sample values of the given sample and surrounding samples of the given sample.
[0298] In one embodiment, the image decoding device (2000) can minimize the error between the original sample and the filtered sample of the current image by performing adaptive loop filtering (2130) including first filtering (2160) or APS filtering (2180). Therefore, by performing adaptive loop filtering (2130), an image with a small error from the original can be provided.
[0299] FIG. 22 is a diagram for explaining an operation of performing filtering on a current sample according to one embodiment.
[0300] In one embodiment, the image decoding device (2000) can adaptively determine a filter based on characteristics such as directionality and activity of the current block (2210). The image decoding device (2000) can filter the current block (2210) using the adaptively determined filter.
[0301] In one embodiment, the image decoding device (2000) can determine the class of the current block (2210) by using the directionality and activity of the current block (2210) according to mathematical expression 1.
[0302] [Mathematical Formula 1]
[0303]
[0304] In one embodiment, the image decoding device (2000) determines the directionality of the current block (2210). and activity The image decoding device (2000) can determine the slope for the current block (2210) based on the slope for the current block (2210). The image decoding device (2000) can determine the slope for the current block (2210) including a vertical slope, a horizontal slope, a slope connecting the upper left and lower right, and a slope connecting the upper right and lower left.
[0305] In one embodiment, the slope for the current block (2210) may be determined by considering not only the samples included in the current block (2210), but also the surrounding samples (2230) of the current block (2210). The slope for the current block (2210) may be calculated based on the samples included in an extended block (2220) that includes the current block (2210). Meanwhile, the extended block (2220) is not limited to the example disclosed in FIG. 22, and may be another block that covers the current block (2210).
[0306] In one embodiment, the vertical slope for the current block (2210) can be determined according to mathematical formula 2. The horizontal slope for the current block (2210) can be determined according to mathematical formula 3. The slope connecting the upper left and lower right for the current block (2210) can be determined according to mathematical formula 4. The slope connecting the upper right and upper left for the current block (2210) can be determined according to mathematical expression 5. R(i,j) representing the current sample (2215) may be the upper left sample of the current block (2210).
[0307] [Equation 2]
[0308]
[0309] [Equation 3]
[0310]
[0311] [Equation 4]
[0312]
[0313] [Equation 5]
[0314]
[0315] Meanwhile, mathematical expressions 2 to 5 may perform one-dimensional Laplacian calculations on some samples indicated by V to reduce the complexity or computational amount of class determination, or may perform one-dimensional Laplacian calculations on all samples included in the expansion block (2220).
[0316] In one embodiment, the image decoding device (2000) may use the maximum and minimum values of the horizontal and vertical slopes, and the maximum and minimum values of the diagonal slopes to determine the directionality. For example, the image decoding device (2000) may use the maximum value of the horizontal or vertical slopes. and minimum can be determined as follows. In addition, the image decoding device (2000) determines the maximum value of the slope in the diagonal direction and minimum can be decided as follows.
[0317]
[0318]
[0319]
[0320]
[0321] In one embodiment, the image decoding device (2000) determines the directionality based on conditions using the maximum and minimum values of the horizontal and vertical slopes and the maximum and minimum values of the diagonal slopes. can determine the value of . For example, , and If the conditions are met, the direction The value of can be determined as 0. The image decoding device (2000) and If it meets the direction The value of can be determined as 2. The image decoding device (2000) but meets If it does not meet the direction The value of can be determined as 1. The image decoding device (2000) does not meet, If it meets the direction The value of can be determined as 4. The image decoding device (2000) does not meet, If the direction is not met, The value can be determined as 3.
[0322] In one embodiment, the image decoding device (2000) uses horizontal and vertical slopes to can determine the value of activity is the activity value It can be a value expressed by quantizing it into a range from 0 to 4. Activity value may be a value determined according to mathematical formula 6.
[0323] [Equation 6]
[0324]
[0325] In one embodiment, the image decoding device (2000) may determine the class of the current block (2210) using the determined directionality and activity values. The image decoding device (2000) may perform filtering on the current sample (2215) included in the current block (2210) using the determined filter. For example, the image decoding device (2000) may determine one filter included in one of at least one predefined filter set as the first filter using the determined class of the current block (2210). Alternatively, the image decoding device (2000) may determine one filter included in at least one of the APS filter sets as the APS filter using the determined class of the current block (2210).
[0326] In one embodiment, the image decoding device (2000) can perform adaptive loop filtering on the current block (2210) by filtering at least one sample or all samples included in the current block (2210) using the determined filter. The image decoding device (2000) can perform filtering on the current sample (2215) based on the current sample (2215), surrounding samples (2230) of the current sample, and the determined filter. The image decoding device (2000) can perform adaptive loop filtering on the current block (2210) by filtering at least one sample or all samples included in the current block (2210) in the same or similar manner as the filtering operation on the current sample (2215).
[0327] Below, the operation of performing adaptive loop filtering is specifically described through Fig. 23.
[0328] FIG. 23 is a diagram for explaining an operation of performing adaptive loop filtering according to one embodiment.
[0329] In one embodiment, the image decoding device (2000) may perform adaptive loop filtering on the current block. The image decoding device (2000) may perform adaptive loop filtering on the current block by performing filtering on all samples included in the current block using the determined filter. The image decoding device (2000) may perform filtering on the current sample of the current block using at least one tap.
[0330] In one embodiment, the video decoding device (2000) can perform adaptive loop filtering using a 7X7 diamond-shaped 7X7 filter (2310) for the luma component of the current sample included in the current block, and using a 5X5 diamond-shaped 5X5 filter (2320) for the chroma component.
[0331] In one embodiment, the image decoding device (2000) may determine one filter set from among at least one APS filter set, or one filter set from among at least one predefined filter set. The image decoding device (2000) may obtain or determine one filter from among the filters included in the determined filter set as a filter to be used for adaptive loop filtering. Hereinafter, an operation of performing adaptive loop filtering by performing APS filtering on a current block will be described in detail as an example.
[0332] For example, the image decoding device (2000) can determine one APS filter set based on at least one APS filter set and an APS index. Referring to FIG. 22, the image decoding device (2000) can determine a slope for a current block (2210) and determine directionality and activity using the determined slope. The image decoding device (2000) can determine a class using the determined directionality and activity values. The image decoding device (2000) can obtain one APS filter included in the determined APS filter set using the determined class value.
[0333] In one embodiment, the image decoding device (2000) can obtain an APS filter by obtaining APS filter coefficients, which are filter coefficients for the APS filter. The APS filter may include a 7X7 filter and a 5X5 filter. The APS filter coefficients may include values C0 to C12 in the 7X7 filter (2310) and values C0 to C12 in the 5X5 filter (2320). The image decoding device (2000) can obtain values C0 to C12 in the 7X7 filter (2310), which are filter coefficients for a luma component of a current sample included in a current block. The image decoding device (2000) can obtain values C0 to C6 in the 5X5 filter (2320), which are filter coefficients for a chroma component of the current sample.
[0334] In one embodiment, the image decoding device (2000) can perform APS filtering on the current block by performing filtering on at least one sample or all samples included in the current block using an APS filter. The image decoding device (2000) can perform filtering on the current sample by performing filtering on the current sample included in the current block using APS filter coefficients. In addition, the image decoding device (2000) can perform APS filtering on the current block by performing filtering on the current sample for at least one sample or all samples included in the current block.
[0335] In one embodiment, referring to FIG. 22, the image decoding device (2000) can perform filtering using the current sample (2215) of FIG. 22, the surrounding samples (2230) of the current sample, and the 7X7 filter (2310) of FIG. 23. When the current sample (2215) corresponds to the position of C12, which is a filter coefficient located at the center within the 7X7 filter (2310), the image decoding device (2000) can perform filtering on the current sample using the surrounding samples of the current sample corresponding to positions C0 to C11.
[0336] For example, the image decoding device (2000) can correspond the first sample (2231) included in the current sample (2215) and the surrounding samples (2230) of the current sample of FIG. 22 to the upper filter coefficient C0 among the filter coefficients in the 7X7 filter (2310). The image decoding device (2000) can correspond the second sample (2232) included in the current sample (2215) and the surrounding samples (2230) of the current sample of FIG. 22 to the upper filter coefficient C1 among the filter coefficients in the 7X7 filter (2310). The image decoding device (2000) can correspond the samples included in the current sample (2215) and the surrounding samples (2230) of the current sample of FIG. 22 to the filter coefficients within the 7X7 filter (2310) in the same manner as the first sample and the second sample are corresponded to the filter coefficients within the 7X7 filter (2310).
[0337] In one embodiment, the image decoding device (2000) can perform APS filtering using filter coefficients C0 to C11 on surrounding samples of the current sample corresponding to positions of filter coefficients C0 to C11 when the filter coefficient C12 located at the center of the 7X7 filter (2310) is matched with the current sample.
[0338] For example, the image decoding device (2000) may be configured to determine the sample values of the intermediate filtered sample corresponding to the current sample of FIG. 22 and the surrounding samples (2230) of the intermediate filtered sample. Sample values of the intermediate filtered samples in Filtering can be performed by applying the filter coefficients included in the 7X7 filter (2310) corresponding to the location of each sample to the difference values minus . The image decoding device (2000) can perform APS filtering on the current sample according to mathematical expression 7.
[0339] [Equation 7]
[0340]
[0341] Meanwhile, in the above equation, represents the intermediate filtered sample corresponding to the current sample, can represent a filtered block obtained by performing APS filtering on intermediate filtered samples. In addition, represents the filter coefficient, may be a clipping function that clips the values of x to values between -y and y. Also, can represent clipping parameters. and silver class It can be an integer between may represent a filter length. The image decoding device (2000) may obtain filter coefficients and clipping parameters from at least one of a bitstream, a slice header, slice data, and an adaptive parameter set. Alternatively, the filter coefficients and clipping parameters may be values predefined in memory.
[0342] In one embodiment, the image decoding device (2000) can obtain a filtered block by performing an operation according to the above mathematical expression 7 on at least one sample or all samples included in the current block.
[0343] Meanwhile, without being limited to the disclosed example, the above filter may be a filter obtained from a predefined filter set rather than a filter obtained from an APS filter set, and the first filtering using the first filter may be performed in the same or similar manner as the method of performing APS filtering using APS filtering. In addition, the equation for performing filtering on the current sample is not limited to Equation 7, and may use a sample other than the restored sample, and the filter coefficient may include parameters for other samples as well as parameters for the restored sample. In addition, the image decoding device (2000) may perform adaptive loop filtering including APS filtering or filtering using a predefined filter set using only filter coefficients without using a clipping function and a clipping parameter.
[0344] Meanwhile, for the convenience of explanation, the method of performing filtering using a 7X7 filter (2310) on the luma component of the current sample included in the current block has been described in detail, but adaptive loop filtering can be performed on the current block by performing filtering in the same manner on other samples included in the current block. In addition, filtering can be performed on the chroma component of the current sample using a 5X5 filter (2320) in the same or similar manner as the method of performing filtering using a 7X7 filter (2310) on the luma component of the current sample. In addition, although the APS filter has been described as an example, the first filter, the second filter, and the third filter of the present disclosure can also perform filtering in the same or similar manner as the method disclosed in FIG. 23.
[0345] FIG. 24 is a diagram illustrating a filtering operation performed in an in-loop filter according to one embodiment.
[0346] In one embodiment, the in-loop filtering unit (2400) can perform at least one of deblocking filtering (2410), sample adaptive offset filtering (2420), bilateral filtering (2425), and adaptive loop filtering (2430).
[0347] In one embodiment, the deblocking filtering (2410) and sample adaptive offset filtering (2420) of the in-loop filtering unit (2400) may correspond to the deblocking filtering (2110) and sample adaptive offset filtering (2120) of FIG. 21, and therefore, the same description is omitted.
[0348] In one embodiment, bidirectional filtering (2425) may be a filtering method that considers not only spatial parameters but also intensity parameters of surrounding samples for the current sample to reduce ringing artifacts. Bidirectional filtering (2425) may be performed in parallel with sample-adaptive offset filtering after deblocking filtering, or may be a filtering method performed before or after sample-adaptive offset filtering.
[0349] In one embodiment, the image decoding device (2000) may perform bidirectional filtering (2425) on the current sample by assigning a larger weight to a sample among surrounding samples of the current sample that has a smaller difference in spatial parameters adjacent to the current sample and / or a sample among surrounding samples that has a smaller difference in intensity parameters from the current sample.
[0350] In one embodiment, the video decoding device (2000) can obtain an intermediate filtered block including an intermediate filtered sample corresponding to a current sample by performing at least one of deblocking filtering, sample adaptive offset filtering, and bidirectional filtering on a restoration block for the current block.
[0351] In one embodiment, the image decoding device (2000) can obtain information regarding adaptive loop filtering. The image decoding device (2000) can obtain information (2440) regarding whether to use an APS filter set included in the information regarding adaptive loop filtering. The image decoding device (2000) can obtain a filter set index included in the information regarding adaptive loop filtering.
[0352] In one embodiment, the image decoding device (2000) can perform adaptive loop filtering (2430) on the current block based on information (2440) on whether to use an APS filter set.
[0353] In one embodiment, the image decoding device (2000) may perform filtering (2450) using a predefined filter set if it is determined not to use the APS filter set based on information (2440) on whether to use the APS filter set. The image decoding device (2000) may perform adaptive loop filtering (2430) by performing filtering (2450) using the predefined filter set.
[0354] In one embodiment, the act of performing filtering (2450) using a predefined filter set may include performing a first filtering (2454) on the current block or performing a second filtering (2458) on the current block.
[0355] In one embodiment, when the video decoding device (2000) performs filtering (2450) using a predefined filter set, the video decoding device (2000) may obtain a filter set index from a bitstream, a slice header, slice data, or an adaptive parameter set. The filter set index of FIG. 24 may be an index that performs the same or a similar role as the filter set index of FIG. 21, or may be an index that performs a different role. The video decoding device (2000) may obtain a filter set index in units of one block among a maximum coding unit, a coding unit, a prediction block, and a transform block.
[0356] In one embodiment, the image decoding device (2000) may perform filtering (2450) using a predefined filter set for a current block, based on at least one predefined filter set and a filter set index, using at least one filter. For example, the at least one filter may include a first filter or a second filter. Filtering (2450) using a predefined filter set may include at least one of the first filtering, the second filtering, and the third filtering.
[0357] In one embodiment, the image decoding device (2000) may store at least one predefined filter set in memory. Each predefined filter set may include information about filters corresponding to a plurality of classes, respectively. For example, the number of predefined filters may be 512. The number of predefined filter sets may be 2. Additionally, each filter set may include information about filters corresponding to 7168 classes, respectively. Each predefined filter set may have the same or different sizes of extension blocks used to determine classes.
[0358] Meanwhile, the number of predefined filters and the number of predefined filter sets are not limited to the disclosed examples.
[0359] In one embodiment, the image decoding device (2000) may input an intermediate filtered block to the first classifier (2452) to obtain a first filter. Meanwhile, obtaining or determining a filter may be obtaining or determining a filter coefficient. For example, obtaining the first filter may be obtaining at least one first filter coefficient. Obtaining the second filter may be obtaining at least one second filter coefficient. Obtaining the third filter may be obtaining at least one third filter coefficient. Obtaining the APS filter may be obtaining at least one APS filter coefficient.
[0360] In one embodiment, the first classifier (2452) may receive an intermediate filtered block as input and determine the class of the current block. The first classifier (2452) may output a determined filter using the determined class and a first predefined filter set. The image decoding device (2000) may obtain filter coefficients for the first filter from the first classifier (2452). The first classifier (2452) may be a Laplacian classifier that determines a class based on directionality and activity.
[0361] In one embodiment, the image decoding device (2000) can determine a class using a Laplacian classifier according to mathematical expression 8.
[0362] [Equation 8]
[0363]
[0364] Meanwhile, in the above equation, can represent the number of values of directionality. Also, , ,and are each in mathematical formula 1 , ,and , and the same description is omitted as it is redundant. Meanwhile, i may be a value indicating a classifier. For example, if i = 0, it may indicate a value for the first classifier (2452). For example, in the first classifier (2452), the activity and Class based on can be decided.
[0365] In one embodiment, the image decoding device (2000) determines the ratio of the maximum and minimum values of the horizontal or vertical slope according to the following equation: , the ratio of the maximum and minimum values of the slope in the diagonal direction can be decided as follows.
[0366]
[0367]
[0368] In one embodiment, the image decoding device (2000) can determine the directionality using a threshold list. The image decoding device (2000) can determine the horizontal and vertical edge strength. and diagonal edge strength can be calculated. The image decoding device (2000) calculates horizontal and vertical edge strengths and diagonal edge strength By comparing it with the elements included in the threshold list, the directionality can be determined.
[0369] For example, the video decoding device (2000) You can use the list of threshold values. List of threshold values may be a threshold list for the first classifier (2452). The image decoding device (2000), If satisfied, horizontal and vertical edge strength can be determined as 0. In addition, the image decoding device (2000) If, The maximum integer satisfying the horizontal and vertical edge strength can be determined. The video decoding device (2000) is If satisfies, the diagonal edge strength can be determined as 0. In addition, the image decoding device (2000) If, The largest integer satisfying the diagonal edge strength can be decided by
[0370] Meanwhile, the threshold list may be the same or different depending on whether it is horizontal and vertical edge strength or diagonal edge strength, and is not limited to the disclosed examples.
[0371] In one embodiment, the image decoding device (2000) comprises horizontal and vertical edge strength and diagonal edge strength After deciding, In this case, the directionality can be determined according to Table 1. The image decoding device (2000) If not, direction according to Table 2 can decide.
[0372] [Table 1]
[0373] [Correction pursuant to Rule 91, September 2024]
[0374] [Table 2]
[0375] [Correction pursuant to Rule 91, September 2024]
[0376] In one embodiment, the image decoding device (2000) uses horizontal and vertical slopes to can determine the value of activity is the activity value It can be a value expressed by quantizing it into a range from 0 to n. Activity value may be a value determined according to mathematical formula 9. Meanwhile, the activity determined in the first classifier (2452) The quantization parameter n used to determine can be 15.
[0377] [Equation 9]
[0378]
[0379] In one embodiment, the image decoding device (2000) can determine a class using a Laplacian classifier according to mathematical expression 10.
[0380] [Equation 10]
[0381]
[0382] In one embodiment, the image decoding device (2000) can update the class of the first filter using the class according to Equation 8, according to Equation 10.
[0383] In one embodiment, the image decoding device (2000) may calculate the average of the sample values included in the extended block of the current block. The image decoding device (2000) may calculate the difference between the sample value and the average for each sample included in the current block. The image decoding device (2000) may determine a scaling factor based on the activity derived in the process of calculating the class according to Equation 8.
[0384] In one embodiment, the image decoding device (2000) quantizes the square root of the sum of the difference between the sample value and the average for each sample value included in the current block as a scaling factor. can be obtained. For example, The value can be an integer between 0 and 7.
[0385] In one embodiment, the image decoding device (2000) can perform first filtering (2454) on the current block using the reconstruction block, the intermediate filtered block for the current block, and the first filter. The image decoding device (2000) can obtain a first filtered block including a first filtered sample corresponding to the current sample by performing the first filtering (2454) using the reconstruction block, the intermediate filtered block, and the first filter.
[0386] In one embodiment, the image decoding device (2000) can obtain a first filtered sample by performing filtering using a restored sample corresponding to the shape of a tap for the first filtering, at least one sample among the surrounding samples of the restored sample, an intermediate filtered sample, and a first filter.
[0387] For example, the image decoding device (2000) may perform filtering on the current sample by using the surrounding samples of the restored sample corresponding to the positions of the remaining filter coefficients when the restored sample corresponds to the position of the filter coefficient located at the center within the tab for the first filtering. The image decoding device (2000) may perform the first filtering (2454) on the current block by performing filtering on at least one sample or all samples included in the current block in the same or similar manner as the filtering on the current sample.
[0388] For example, the image decoding device (2000) can obtain a first filtered sample by performing filtering by applying a first filter to the difference between the value of the intermediate filtered sample corresponding to the current sample included in the reconstructed block and the value of the surrounding samples of the reconstructed sample, and subtracting the value of the intermediate filtered sample corresponding to the current sample included in the intermediate filtered block from each of the values of the surrounding samples of the reconstructed sample. In addition, the image decoding device (2000) can obtain the surrounding samples of the first filtered sample by performing filtering in the same manner as the manner in which the first filtered sample was obtained, also for the surrounding samples of the reconstructed sample. In addition, the image decoding device (2000) can perform the first filtering (2454) on the current block by performing filtering on at least one sample included in the current block in the same or similar manner as the filtering on the current sample.
[0389] Meanwhile, the surrounding samples of the first filtered sample may be samples located around the first filtered sample corresponding to the current sample, and may be samples on which filtering by the first filter has been performed.
[0390] Hereinafter, the first filtering, second filtering, third filtering, and APS filtering of the present disclosure can be performed in the same or similar manner as the filtering using the first filter described above.
[0391] In one embodiment, the image decoding device (2000) can obtain a second filter by inputting an intermediate filtered block to a second classifier (2456). The second classifier (2456) can receive the intermediate filtered block as input and determine a class of the current block. The second classifier (2456) can output the determined filter using the determined class and a second predefined filter set. The image decoding device (2000) can obtain filter coefficients for the second filter from the second classifier (2456). The second classifier (2456) can be a Laplacian classifier that determines a class determined based on directionality and activity.
[0392] Meanwhile, the second classifier (2456) of FIG. 24 may perform a different role from the second classifier (2170) of FIG. 21, or may perform an identical or similar role.
[0393] Meanwhile, the size of the extension block considered for determining the class in the first classifier (2452) may be different from the size of the extension block considered for determining the class in the second classifier (2456). For example, when the size of the current block is 2X2, the size of the extension block in the first classifier (2452) may be 4X4, and the size of the extension block in the second classifier (2456) may be 12X12. However, the size of the current block, the size of the extension block in the first classifier (2452), and the size of the extension block in the second classifier (2456) are not limited to the disclosed example.
[0394] In one embodiment, the image decoding device (2000) may determine the class in the second classifier (2456) in the same or similar manner as the method of determining the class in the first classifier (2452). For example, the image decoding device (2000) may determine the class in the second classifier (2456) according to Equation 8 or Equation 10. However, if the size of the extension block considered for determining the class in the first classifier (2452) is different from the size of the extension block considered for determining the class in the second classifier (2456), the number of samples used for determining the directionality or activity may be different. However, the image decoding device (2000) may determine the directionality in the second classifier (2456) by using Table 1 or Table 2 used in the first classifier (2452). can be determined. In addition, the activity determined in the second classifier (2456) The quantization parameter n used to determine can be 15.
[0395] In one embodiment, the image decoding device (2000) can obtain a second filtered sample corresponding to the current sample by performing second filtering (2458) using the restoration block, the first filtered block, and the second filter. The image decoding device (2000) can obtain a second filtered block including the second filtered sample corresponding to the current sample by performing second filtering (2458) using the restoration block, the first filtered block, and the second filter.
[0396] In one embodiment, the image decoding device (2000) can obtain a second filtered sample by performing filtering on a current sample using a first filtered sample corresponding to the shape of a tap for second filtering, at least one sample among surrounding samples of the first filtered sample, an intermediate filtered sample, and a second filter.
[0397] For example, the image decoding device (2000) may perform filtering on the current sample by using surrounding samples of the first filtered sample corresponding to the positions of the first filtered sample and the remaining filter coefficients when the first filtered sample corresponds to the position of the filter coefficient located at the center within the tap for the second filtering. The image decoding device (2000) may perform second filtering (2458) on the current block by performing filtering on at least one sample or all samples included in the current block in the same or similar manner as the filtering on the current sample.
[0398] Meanwhile, the image decoding device (2000) can obtain surrounding samples of the second filtered sample by performing filtering on surrounding samples of the first filtered sample in the same manner as the method of obtaining the second filtered sample.
[0399] Meanwhile, the operation of obtaining the second filtered sample may be identical or similar to the operation of obtaining the first filtered sample.
[0400] Meanwhile, not limited to the disclosed example, if the tap for filtering includes only one filter coefficient, filtering may be performed using only the current sample (or a predetermined sample corresponding to the current sample) and one filter coefficient. In addition, if the tap for the second filtering includes multiple filter coefficients, the second filtering (2458) may be performed in the same or similar manner as the first filtering (2454).
[0401] Meanwhile, even if the present disclosure below describes a plurality of filter coefficients, if a tap includes only one filter coefficient, filtering can be performed using one filter coefficient and one sample corresponding to the current sample.
[0402] For example, the image decoding device (2000) can obtain a second filtered sample by performing second filtering by applying one filter coefficient included in the second filter tap to the difference between the first filtered sample and the restored sample when the second filter tap includes only one filter coefficient. Meanwhile, not only the second filter but also the filter or tap of the present disclosure may include only one filter coefficient depending on the case, and the same description will be omitted below.
[0403] In one embodiment, the image decoding device (2000) may obtain a first filtered block or a second filtered block as a filtered block based on a filter set index. For example, if the image decoding device (2000) obtains a filter set index for a current block having a value of 0 from the bitstream, the image decoding device (2000) may obtain the first filtered block as the filtered block. If the image decoding device (2000) obtains a filter set index for a current block having a value of 1 from the bitstream, the image decoding device (2000) may obtain the second filtered block as the filtered block.
[0404] In one embodiment, the image decoding device (2000) may perform APS filtering (2490) using the APS filter when it is determined to use the APS filter set based on information (2440) on whether to use the APS filter set. The image decoding device (2000) may perform adaptive loop filtering (2430) by performing the APS filtering (2490).
[0405] In one embodiment, the video decoding device (2000) may obtain information about adaptive loop filtering from a bitstream, a slice header, slice data, or an adaptive parameter set. The information about adaptive loop filtering may include at least one of information about whether to obtain a current APS filter set, the number of filters included in each current APS filter set, at least one APS filter included in the current APS filter set, and an APS index.
[0406] Meanwhile, the APS index of Fig. 24 may be an index that performs the same or similar role as the APS index of Fig. 21.
[0407] In one embodiment, the image decoding device (2000) can perform APS filtering (2490) on the current block using at least one APS filter set and an APS filter obtained based on an APS index.
[0408] In one embodiment, the image decoding device (2000) can obtain at least one current APS filter set or at least one previous APS filter set based on information about adaptive loop filtering obtained from a slice header, slice data, or an adaptive parameter set.
[0409] In one embodiment, the image decoding device (2000) may obtain information about a current APS filter set or obtain index information indicating a slice or block to be referenced to obtain a previous APS filter set. For example, the current APS filter set may have up to 4 filters, the previous APS filter set may have up to 8 filters, and each APS filter set may include up to 25 filters. Each APS filter set may include information about filters corresponding to each of the 25 classes. In addition, each APS filter set may include filter coefficients for filters included in each APS filter set. Each APS filter set may include classifier information indicating which type of classifier is used to determine a class.
[0410] Meanwhile, the maximum number of current APS filter sets, the maximum number of previous APS filter sets, and the maximum number of filters included in each filter set are not limited to the disclosed examples.
[0411] In one embodiment, the third classifier (2460) may be determined as one of the plurality of classifiers. The image decoding device (2000) may determine one of the plurality of classifiers as the third classifier (2460) based on classifier information included in each APS filter set. For example, the image decoding device (2000) may determine one of the following as the third classifier (2460): a Laplacian classifier that determines a class determined according to directionality and activity, a band-based classifier that determines a class based on the sum of sample values included in an intermediate filtered block for the current block, and a residual-based classifier that determines a class based on the sum of sample values included in a residual block for the current block, based on the classifier information included in each APS filter set.
[0412] In one embodiment, a band-based classifier can determine a class using the following mathematical expression (11). Meanwhile, the sum in mathematical expression (11) can represent the sum of sample values included in the intermediate filtered block.
[0413] [Equation 11]
[0414] class_index (sum * 25) >> (sample bit depth + 2)
[0415] In one embodiment, a residual-based classifier can determine a class using the following mathematical expression (12). Meanwhile, the sum in mathematical expression (12) can represent the sum of the absolute values of the extended residual block including the residual block corresponding to the current block.
[0416] [Equation 12]
[0417] classIdx = sum >> (sample bit depth - 4)
[0418] In one embodiment, the image decoding device (2000) may determine at least one of a Laplacian classifier, a band-based classifier, and a residual-based classifier as the third classifier (2460) based on at least one APS filter set and an APS index. For example, the image decoding device (2000) may determine a classifier corresponding to an APS filter set indicated by an APS index as the third classifier (2460) based on classifier information included in the APS filter set indicated by the APS index.
[0419] In one embodiment, the image decoding device (2000) can obtain an APS filter by inputting an APS filter set indicated by an APS index into a third classifier (2460). The image decoding device (2000) can determine a class using the determined third classifier (2460). In addition, the third classifier (2460) can determine an APS filter based on the APS filter set indicated by the APS index and the determined class. The image decoding device (2000) can obtain an APS filter by inputting an intermediate filtered block or a residual block into the third classifier (2460). For example, when the image decoding device (2000) uses a Laplacian classifier or a band-based classifier as the third classifier (2460), the image decoding device (2000) can receive an intermediate filtered block and determine the class of the current block. When the video decoding device (2000) uses a residual-based classifier as a third classifier (2460), it can receive a residual block as input and determine the class of the current block.
[0420] In one embodiment, when the image decoding device (2000) uses a Laplacian classifier as the third classifier, it can determine the class of the current block in the same or similar manner as the manner in which the first classifier (2452) or the second classifier (2456) determines the class. For example, the image decoding device (2000) can determine the class in the third classifier according to Equations 1 and 8. However, when the size of the extension block considered for determining the class in the first classifier (2452) is different from the size of the extension block considered for determining the class in the third classifier, the number of samples used for determining the directionality or activity may be different.
[0421] For example, the image decoding device (2000) can determine a class according to mathematical expression 1. In addition, the directionality and activity can be determined according to the operation of determining the directionality and activity disclosed in FIG. 22. and activity can be determined. The image decoding device (2000) determines the determined direction and activity You can use it to determine the class of the current block.
[0422] In one embodiment, when the image decoding device (2000) uses a band-based classifier as a third classifier, the image decoding device (2000) may determine a class using sample values included in an intermediate filtered block for the current block. For example, when the size of the current block is 2X2, the image decoding device (2000) may determine or obtain a class of the current block based on sample values of samples included in an intermediate filtered block of size 2X2 obtained by performing at least one of deblocking filtering, sample adaptive offset filtering, and bidirectional filtering on a reconstructed block for the current block.
[0423] In one embodiment, when the image decoding device (2000) uses a residual-based classifier as a third classifier, the image decoding device (2000) may determine a class using sample values included in a residual block for the current block. For example, when the size of the current block is 2X2, the image decoding device (2000) may determine or obtain a class of the current block based on sample values of samples included in a 2X2 sized residual block for the current block.
[0424] In one embodiment, the image decoding device (2000) can perform adaptive loop filtering (2430) by performing APS filtering (2490) using an APS filter on the current block. The image decoding device (2000) can perform filtering using an APS filter on the current sample included in the current block. In addition, the image decoding device (2000) can perform APS filtering (2490) on the current block by performing filtering on at least one sample or all samples included in the current block in a manner identical or similar to that in which the filtering using the APS filter was performed on the current sample.
[0425] In one embodiment, the image decoding device (2000) can perform APS filtering (2490) using an intermediate filtered block, a first filtered block, a second filtered block, a third filtered block, a restoration block, a residual block, a first filtered residual block, and an APS filter. The image decoding device (2000) can obtain an APS filtered block obtained by performing the APS filtering (2490) as a filtered block.
[0426] In one embodiment, the image decoding device (2000) may obtain filter coefficients for a third filter, which is a predefined filter for performing APS filtering (2490). The filter coefficients for the third filter may be information previously stored in a memory. The image decoding device (2000) may perform third filtering (2470) using the restoration block and the third filter, thereby obtaining a third filtered block.
[0427] In one embodiment, the image decoding device (2000) may utilize the results of filtering (2450) using a predefined filter set to perform APS filtering (2490). For example, the image decoding device (2000) may utilize a first filtered block and a second filtered block to perform APS filtering (2490).
[0428] In one embodiment, the image decoding device (2000) may additionally utilize the first filter used in the filtering (2450) using a predefined filter set to perform APS filtering (2490). For example, the image decoding device (2000) may obtain a first filtered residual block by performing the first filtering (2480) using a residual block and the first filter. For example, the first filter may be a filter determined by determining a class through a first classifier (2452) and using the determined class and the predefined filter set.
[0429] Meanwhile, APS filtering (2490) for the current block can be performed by performing filtering using an APS filter on at least one sample or all samples included in the current block in the same or similar manner as performing filtering using an APS filter on the current sample included in the current block. Meanwhile, the operation of performing filtering using an APS filter on the current sample will be described in detail in Fig. 25.
[0430] In one embodiment, the image decoding method may use a first filtered block or a second filtered block obtained through filtering (2450) using a predefined filter set for APS filtering (2490). The operations for obtaining the first filtered block and the second filtered block have been described in detail above, and thus a detailed description thereof will be omitted.
[0431] In one embodiment, the image decoding device (2000) can obtain a third filtered block including a third filtered sample corresponding to a current sample by performing third filtering using a reconstruction block, an intermediate filtered block, and a third filter. For example, the image decoding device (2000) can obtain the third filtered sample by performing filtering using a reconstruction sample corresponding to the shape of a tap for the third filtering, at least one sample among the surrounding samples of the reconstruction sample, an intermediate filtered sample, and the third filter.
[0432] In addition, the image decoding device (2000) can obtain surrounding samples of the third filtered sample by performing filtering on surrounding samples of the restored sample in the same manner as the method of obtaining the third filtered sample.
[0433] Meanwhile, the operation of obtaining the third filtered sample may be the same or similar to the operation of obtaining the first filtered sample or the second filtered sample, and the same details are omitted.
[0434] In one embodiment, the video decoding device (2000) can obtain a first filtered residual block by performing first filtering (2480) using a residual block for a current block and a first filter. The video decoding device (2000) can obtain a first filtered residual block including a first filtered residual sample corresponding to a current sample. The video decoding device (2000) can obtain a first filtered residual sample corresponding to a current sample by filtering the current sample using a residual sample corresponding to a shape of a tap for the first filtering and at least one sample among surrounding samples of the residual sample and the first filter.
[0435] For example, the image decoding device (2000) may perform filtering on the current sample by using the surrounding samples of the residual sample corresponding to the positions of the remaining filter coefficients and the residual sample when the residual sample corresponds to the position of the filter coefficient located at the center within the tap for the first filtering. The image decoding device (2000) may perform the first filtering (2480) on the current block by performing filtering on at least one sample or all samples included in the current block in the same or similar manner as the filtering on the current sample.
[0436] For example, the image decoding device (2000) can obtain a first filtered residual sample by performing filtering by applying a first filter to each of the values of a residual sample and surrounding samples of the residual sample.
[0437] The image decoding device (2000) can obtain the first filtered residual block by performing filtering on at least one block or all blocks included in the residual block in a manner similar to the manner in which the first filtered residual sample was obtained. In addition, the image decoding device (2000) can obtain the surrounding samples of the first filtered residual sample by performing filtering on the surrounding samples of the residual sample in the same manner as the manner in which the first filtered residual sample was obtained.
[0438] Meanwhile, the first filtering (2480) may be a filtering that uses a filter identical to or similar to the first filter used in the first filtering (2454) included in the filtering (2450) using a predefined filter set. For example, the first filtering (2480) may be a filtering that uses all or some of the filter coefficients used in the first filtering (2454).
[0439] In one embodiment, the image decoding device (2000) can obtain an adaptive loop filtering sample by using at least one adaptive filter coefficient (APS filter coefficient) obtained from information about adaptive loop filtering on an intermediate filtered sample, a first filtered sample, a second filtered sample, a third filtered sample, a restored sample, and a residual sample.
[0440] In one embodiment, the image decoding device (2000) may perform adaptive loop filtering on a current block by using at least one sample of an intermediate filtered sample and surrounding samples of the intermediate filtered sample, a first filtered sample and surrounding samples of the first filtered sample, a second filtered sample and surrounding samples of the second filtered sample, a third filtered sample and surrounding samples of the third filtered sample, a reconstructed sample corresponding to a current sample included in a reconstructed block and surrounding samples of the reconstructed sample, and a residual sample corresponding to a current sample included in a residual block and surrounding samples of the residual sample.
[0441] For example, the image decoding device (2000) can obtain an adaptive loop filtered sample by performing pixel-wise filtering by applying adaptive filter coefficients to at least one sample among an intermediate filtered sample and its surrounding samples, a first filtered sample and its surrounding samples, a second filtered sample and its surrounding samples, a third filtered sample and its surrounding samples, a reconstructed sample and its surrounding samples, and a residual sample and its surrounding samples. The image decoding device (2000) can perform adaptive loop filtering by performing APS filtering (2490) on a current block. Additionally, the image decoding device (2000) can obtain an APS filtered block obtained by performing APS filtering (2490) as an adaptive loop filtered block.
[0442] In one embodiment, the video decoding device (2000) may perform adaptive loop filtering on a current block using a first filtered residual sample and at least one of the surrounding samples of the first filtered residual sample. The video decoding device (2000) may obtain from a bitstream whether to use the first filtered residual sample and at least one of the surrounding samples of the first filtered residual sample. The video decoding device (2000) may obtain from at least one of a slice header, slice data, and an adaptive parameter set whether to use the first filtered residual sample and at least one of the surrounding samples of the first filtered residual sample.
[0443] Additionally, whether to use at least one sample among the first filtered residual sample and the surrounding samples of the first filtered residual sample can be determined by the number of filter coefficients and parameters associated with the filter coefficients.
[0444] Below, the form of the tab for APS filtering is described in detail in Fig. 25.
[0445] FIG. 25 is a diagram for explaining an operation of performing filtering on a current sample according to one embodiment.
[0446] In one embodiment, the image decoding device (2000) may perform filtering on the current sample by using at least one of the spatial tap (2510), the first filter tap (2520), the second filter tap (2530), the restoration tap (2540), the residual tap (2550), the first residual filter tap (2560), and the third filter tap (2570). In addition, the image decoding device (2000) may perform APS filtering on the current block by performing filtering on at least one sample or all samples included in the current block in a manner identical or similar to the manner in which the filtering on the current sample is performed.
[0447] In one embodiment, the operation of the image decoding device (2000) performing APS filtering on the current block may include an operation of performing filtering on the current sample using at least one of the spatial tap (2510), the first filter tap (2520), the second filter tap (2530), the restoration tap (2540), the residual tap (2550), the first residual filter tap (2560), and the third filter tap (2570) according to the above mathematical expression 13.
[0448] [Equation 13]
[0449]
[0450] In one embodiment, can represent an intermediate filtered sample corresponding to the current sample. can represent a filtered sample. can represent the filter coefficients.
[0451] In one embodiment, the image decoding device (2000) may perform APS filtering using an intermediate filtered block and a spatial tap (2510). For example, the image decoding device (2000) may perform filtering using at least one sample among surrounding samples of the intermediate filtered sample corresponding to positions of APS filter coefficients C0 to C9 included in the spatial tap (2510) and the spatial tap (2510) when the intermediate filtered sample is assigned to the central position of the spatial tap (2510).
[0452] For example, the image decoding device (2000) may perform filtering by multiplying the difference value of the intermediate filtered sample and the surrounding samples of the intermediate filtered sample corresponding to the positions of the APS filter coefficients C0 to C9 included in the spatial tap (2510) by each of the APS filter coefficients. The operation of performing filtering using the APS filter coefficients C0 to C9 included in the spatial tap (2510) and the surrounding samples of the intermediate filtered sample may be described by the following equation. In the equation below, is the value of each surrounding sample of the intermediate filtered sample and the intermediate filtered sample It can represent the difference value of the difference value or the value obtained by clipping the difference value based on the clipping parameter.
[0453]
[0454] In one embodiment, the image decoding device (2000) may perform APS filtering using the first filtered block and the first filter tap (2520). For example, when the image decoding device (2000) matches the first filtered sample to the filter coefficient C34 located at the center of the first filter tap (2520), the image decoding device (2000) may perform filtering using the first filter tap (2520), and at least one sample among the surrounding samples of the first filtered sample corresponding to the positions of the APS filter coefficients C10 to C27 included in the first filter tap (2520).
[0455] For example, the image decoding device (2000) may perform filtering by multiplying the difference values of the surrounding samples of the first filtered sample corresponding to the positions of the APS filter coefficients C10 to C27 included in the first filter tap (2520) and the intermediate filtered sample by each APS filter coefficient. The operation of performing filtering using the APS filter coefficients C10 to C27 included in the first filter tap (2520) and the surrounding samples of the first filtered sample may be described by the following equation. In the equation below, It can represent a difference value obtained by subtracting the value of the intermediate filtered sample from the values of the surrounding samples of the first filtered sample, or a value obtained by clipping the difference value based on a clipping parameter.
[0456]
[0457] In one embodiment, the image decoding device (2000) can perform filtering by multiplying the difference value between the first filtered sample and the intermediate filtered sample corresponding to the position of the APS filter coefficient C34 included in the first filter tap (2520) by the APS filter coefficient C34.
[0458] In one embodiment, the image decoding device (2000) may perform APS filtering using the second filtered block and the second filter tap (2530). For example, the image decoding device (2000) may perform filtering using the second filtered sample and the APS filter coefficient C35 included in the second filter tap (2530). For example, the image decoding device (2000) may perform filtering by multiplying the difference value between the second filtered sample and the intermediate filtered sample by the APS filter coefficient C35.
[0459] In one embodiment, the operation of performing filtering using the APS filter coefficient C34 and the first filtered sample included in the first filter tap (2520) and the operation of performing filtering using the APS filter coefficient C35 and the second filtered sample included in the second filter tap (2530) can be described by the following equation. In the equation below, may represent a difference value obtained by subtracting the value of the intermediate filtered sample from the value of the first filtered sample or a difference value obtained by subtracting the value of the intermediate filtered sample from the value of the second filtered sample. Or, The above difference values can represent clipped values based on clipping parameters.
[0460]
[0461] In one embodiment, the image decoding device (2000) can perform APS filtering using a restoration block and a restoration tab (2540). The image decoding device (2000) can perform APS filtering including an operation of performing filtering using a restoration sample and a restoration tab (2540). For example, when a restoration sample is matched to a filter coefficient C36 located at the center of the restoration tab (2540), the image decoding device (2000) can perform filtering using at least one sample among surrounding samples of the restoration sample corresponding to positions of APS filter coefficients C32 to C33 included in the restoration tab (2540) and the restoration tab (2540).
[0462] For example, the image decoding device (2000) can perform filtering by multiplying the difference values of the intermediate filtered samples and the surrounding samples of the restored sample corresponding to the positions of the APS filter coefficients C32 to C33 included in the restoration tab (2540) by the respective APS filter coefficients. The operation of performing filtering using the APS filter coefficients C32 to C33 included in the restoration tab (2540) and the surrounding samples of the restored sample can be described by the following equation. In the equation below, It can represent a difference value obtained by subtracting the value of the intermediate filtered sample from the value of each surrounding sample of the restored sample, or a value obtained by clipping the difference value based on a clipping parameter.
[0463]
[0464] In one embodiment, the image decoding device (2000) may perform filtering by multiplying the difference value between the restored sample corresponding to the position of the APS filter coefficient C36 included in the restoration tab (2540) and the intermediate filtered sample by the APS filter coefficient C36. The operation of performing filtering using the APS filter coefficient C36 included in the restoration tab (2540) and the restored sample may be described by the following equation. In the equation below, It can represent a difference value obtained by subtracting the value of the intermediate filtered sample from the value of the restored sample, or a value obtained by clipping the difference value based on a clipping parameter.
[0465]
[0466] In one embodiment, the image decoding device (2000) may perform APS filtering using a residual block and a residual tap (2550). For example, the image decoding device (2000) may perform filtering using C37, which is an APS filter coefficient included in the residual tap (2550), and a residual sample. For example, the image decoding device (2000) may perform filtering by multiplying the residual sample by C37, which is an APS filter coefficient included in the residual tap (2550). An operation of performing filtering using C37, which is an APS filter coefficient included in the residual tap (2550), and a residual sample may be described by the following equation. In the equation below, can represent the value of the residual sample or the value of the residual sample clipped based on the clipping parameter.
[0467]
[0468] In one embodiment, the video decoding device (2000) may perform APS filtering using the first filtered residual block and the first residual filter tap (2560). For example, the video decoding device (2000) may perform filtering using C39, which is an APS filter coefficient included in the first residual filter tap (2560), and the first filtered residual sample. For example, the video decoding device (2000) may perform filtering by multiplying the first filtered residual sample by C39, which is an APS filter coefficient included in the first residual filter tap (2560). An operation of performing filtering using C39, which is an APS filter coefficient included in the first residual filter tap (2560), and the first filtered residual sample may be described by the following equation. In the equation below, may represent the value of the first filtered residual sample or the value obtained by clipping the value of the first filtered residual sample.
[0469]
[0470] In one embodiment, the image decoding device (2000) may perform APS filtering using the third filtered block and the third filter tap (2570). For example, when the image decoding device (2000) matches the third filtered sample to the filter coefficient C38 located at the center of the third filter tap (2570), the image decoding device (2000) may perform filtering using the third filtered sample and at least one sample among the surrounding samples of the third filtered sample corresponding to the positions of APS filter coefficients C28 to C31 included in the third filter tap (2570), and the third filter tap (2570).
[0471] For example, the image decoding device (2000) may perform filtering by multiplying the difference values of the intermediate filtered sample and the surrounding samples of the third filtered sample corresponding to the positions of the APS filter coefficients C28 to C31 included in the third filter tap (2570) by the respective APS filter coefficients. The operation of performing filtering using the APS filter coefficients C28 to C31 included in the third filter tap (2570) and the surrounding samples of the third filtered sample may be described by the following equation. In the equation below, It can represent a difference value obtained by subtracting the value of the intermediate filtered sample from the value of each of the surrounding samples of the third filtered sample, or a value obtained by clipping the difference value based on a clipping parameter.
[0472]
[0473] In one embodiment, the image decoding device (2000) can perform filtering by multiplying the difference value between the third filtered sample corresponding to the position of C38, which is an APS filter coefficient included in the third filter tap (2570), and the intermediate filtered sample by C38, which is an APS filter coefficient.
[0474] In one embodiment, the operation of performing filtering using the APS filter coefficient C38 and the third filtered sample included in the third filter tap (2570) can be described by the following equation. In the equation below, It can represent a difference value obtained by subtracting the value of the intermediate filtered sample from the value of the third filtered sample, or a value obtained by clipping the difference value based on a clipping parameter.
[0475]
[0476] Meanwhile, the spatial tap (2510), the first filter tap (2520), the second filter tap (2530), the restoration tap (2540), the residual tap (2550), the first residual filter tap (2560), and the third filter tap (2570) disclosed in FIG. 25 are not limited to the disclosed examples, and the image decoding device (2000) can perform APS filtering using each tap and all or part of the samples corresponding to each tap and the surrounding samples thereof. In addition, the image decoding device (2000) can perform APS filtering on the current block using other samples not disclosed in FIG. 25.
[0477] Meanwhile, in the present disclosure, for the convenience of explanation, clipping operation based on clipping parameters is omitted.
[0478] FIG. 26 is a diagram for explaining an operation of performing filtering on a current sample according to one embodiment.
[0479] In one embodiment, the image decoding device (2000) may perform adaptive loop filtering on the current block. The operation of the image decoding device (2000) performing adaptive loop filtering on the current block may include the operation of performing APS filtering on the current block. In addition, the operation of the image decoding device (2000) performing APS filtering on the current block may include the operation of performing filtering on the current sample.
[0480] In one embodiment, the image decoding device (2000) can obtain a filtered block by performing APS filtering on the current block. The image decoding device (2000) can obtain a filtered block by performing filtering on each of at least one sample or all samples included in the current block. The image decoding device (2000) can obtain a filtered block including a filtered sample corresponding to the current sample by performing APS filtering on the current block including the current sample.
[0481] In one embodiment, the image decoding device (2000) can obtain a filtered sample by adding at least one APS filter coefficient (2620) to the intermediate filtered sample and a value obtained by multiplying at least one input value (2630) corresponding to each of the at least one APS filter coefficient (2620).
[0482] In one embodiment, referring to FIG. 25, the image decoding device (2000) can obtain a difference value obtained by subtracting the sample value of the intermediate filtered sample from the sample value of each of the surrounding samples of the intermediate filtered sample corresponding to the positions of APS filter coefficients C0 to C9 included in the spatial tap (2510) as input values of i0 to i9.
[0483] In one embodiment, the image decoding device (2000) can obtain a difference value obtained by subtracting a sample value of an intermediate filtered sample from a sample value of each of the surrounding samples of the first filtered sample corresponding to the positions of APS filter coefficients C10 to C27 included in the first filter tap (2520) as input values of i10 to i27.
[0484] In one embodiment, the image decoding device (2000) can obtain a difference value obtained by subtracting the sample value of the intermediate filtered sample from the sample value of each of the surrounding samples of the third filtered sample corresponding to the positions of APS filter coefficients C28 to C31 included in the third filter tap (2570) as the input values of i28 to i31.
[0485] In one embodiment, the image decoding device (2000) can obtain a difference value obtained by subtracting the sample value of the intermediate filtered sample from the sample value of each of the surrounding samples of the restored sample corresponding to the positions of APS filter coefficients C32 to C33 included in the restoration tab (2540) as an input value of i32 to i33.
[0486] In one embodiment, the image decoding device (2000) can obtain the difference value between the first filtered sample and the intermediate filtered sample as an input value of i34. The image decoding device (2000) can obtain the difference value between the second filtered sample and the intermediate filtered sample as an input value of i35. The image decoding device (2000) can obtain the difference value between the reconstructed sample and the intermediate filtered sample as an input value of i36. The image decoding device (2000) can obtain the sample value of the residual sample as an input value of i37. The image decoding device (2000) can obtain the difference value between the third filtered sample and the intermediate filtered sample as an input value of i38. The image decoding device (2000) can obtain the sample value of the first filtered residual sample as an input value of i37.
[0487] In one embodiment, the image decoding device (2000) can obtain a filtered sample by adding the inner product value of the APS filter coefficients C0 to C39 and the input values i0 to i39 to the intermediate filtered sample.
[0488] Meanwhile, the image decoding device (2000) is not limited to the disclosed example, and may perform filtering on the current sample by using APS filter coefficients having a structure different from the structure of the APS filter coefficients of the present disclosure, or by using input values having a structure different from the structure of the input values of the present disclosure.
[0489] FIG. 27 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0490] In one embodiment, the in-loop filtering unit (2700) can perform at least one of deblocking filtering (2710), sample adaptive offset filtering (2720), bidirectional filtering (2725), and adaptive loop filtering (2730).
[0491] In one embodiment, the in-loop filtering unit (2700) of FIG. 27 may correspond to the deblocking filtering (2710), sample adaptive offset filtering (2720), and bidirectional filtering (2725) of FIG. 24, respectively, and therefore, the same description is omitted.
[0492] In one embodiment, information (2740) on whether to use the APS filter set of FIG. 27, filtering using a predefined filter set (2750), a first classifier (2752), a first filtering (2754), a second classifier (2756), a second filtering (2758), a third classifier (2760), a third filtering (2770), a first filtering (2780), and APS filtering (2790) may correspond to information (2440) on whether to use the APS filter set of FIG. 24, filtering using a predefined filter set (2450), a first classifier (2452), a first filtering (2454), a second classifier (2456), a second filtering (2458), a third classifier (2460), a third filtering (2470), a first filtering (2480), and APS filtering (2490), and thus the same description is omitted.
[0493] In one embodiment, the image decoding device (2000) can obtain a first filtered residual block by performing first filtering (2780) using a residual block for a current block and a first filter. The image decoding device (2000) can obtain a first filtered residual sample corresponding to the current sample by performing filtering using the residual sample for the current sample and the first filter. The image decoding device (2000) can obtain a first filtered residual block including the first filtered residual sample corresponding to the current sample by filtering the residual block using the first filter.
[0494] Additionally, the image decoding device (2000) can obtain the first filtered residual block based on performing filtering on at least one or all samples included in the residual block in a manner identical or similar to the manner in which the first filtered residual sample was obtained.
[0495] In one embodiment, the image decoding device (2000) can obtain a first filtered residual sample by performing filtering using residual samples and a first filter. The image decoding device (2000) can obtain a first filtered residual sample by performing filtering using predefined filter coefficients for the residual samples and the first filter.
[0496] In one embodiment, the image decoding device (2000) may obtain a first filtered residual sample by performing filtering using a residual sample and at least one sample among surrounding samples of the residual sample and a first filter corresponding to a predefined filter coefficient for first filtering (2780) on the residual block or residual sample. Meanwhile, the first filter may use a predefined filter coefficient for the first filtering (2780).
[0497] For example, the image decoding device (2000) can obtain a first filtered residual sample by adding each value obtained by applying a predefined filter coefficient for the first filter to at least one of the residual sample and the surrounding samples of the residual sample, each corresponding to the sample.
[0498] Meanwhile, the first filtering (2780) may be a filtering that uses a filter identical to or similar to the first filter used in the first filtering (2754) included in the filtering (2750) using a predefined filter set. For example, the first filtering (2780) may be a filtering that uses all or part of the filter coefficients used in the first filtering (2754).
[0499] In one embodiment, the image decoding device (2000) can obtain a second filtered residual block by performing second filtering (2790) using the first filtered residual block and the second filter for the current block. The image decoding device (2000) can obtain a second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual sample corresponding to the current sample and the second filter. The image decoding device (2000) can obtain a second filtered residual block including the second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual sample and the second filter.
[0500] Additionally, the image decoding device (2000) can obtain the second filtered residual block based on performing filtering using at least one or all samples included in the first filtered residual block in a manner identical or similar to the manner in which the second filtered residual sample was obtained.
[0501] In one embodiment, the image decoding device (2000) may obtain a second filtered residual sample by performing filtering using a first filtered residual sample corresponding to a predefined filter coefficient for second filtering (2790) on the first filtered residual block or residual sample and a predefined filter coefficient for the second filter. Meanwhile, the second filter may use a predefined filter coefficient for the second filtering (2790).
[0502] For example, the image decoding device (2000) can obtain a second filtered residual sample by applying a predefined filter coefficient for a second filter to the first filtered residual sample.
[0503] Meanwhile, the second filtering (2782) may be a filtering that uses a filter identical to or similar to the second filter used in the second filtering (2758) included in the filtering (2750) using a predefined filter set. For example, the second filtering (2780) may be a filtering that uses all or some of the filter coefficients used in the second filtering (2758).
[0504] In one embodiment, the image decoding device (2000) can perform adaptive loop filtering (2730) by performing APS filtering (2790). The image decoding device (2000) can perform APS filtering on the current block using the first filtered residual sample and the second filtered residual sample. The image decoding device (2000) can obtain an adaptive loop filtered sample by performing APS filtering (2790). The image decoding device (2000) can obtain the APS filtered sample obtained by performing APS filtering (2790) as an adaptive loop filtered sample for the current sample.
[0505] For example, the image decoding device (2000) can perform APS filtering (2790) using an APS filter obtained based on information about a first filtered residual sample, a second filtered residual sample, and at least one of the surrounding samples of the second filtered residual sample, and adaptive loop filtering.
[0506] In one embodiment, the image decoding device (2000) may obtain an APS filter set based on information about adaptive loop filtering. In addition, the image decoding device (2000) may obtain an APS filter based on index information indicating one of at least one APS filter included in the APS filter set. The image decoding device (2000) may obtain at least one adaptive filter coefficient as the APS filter. Meanwhile, as described above, the APS filter set and the APS filter may be expressed as an adaptive filter set and an adaptive filter.
[0507] In one embodiment, the image decoding device (2000) may obtain an adaptive loop filtered sample by using at least one adaptive filter coefficient obtained from a first filtered residual sample, a second filtered residual sample, and information about adaptive loop filtering. Meanwhile, the at least one adaptive filter coefficient may include a filter coefficient for the first filtered residual sample and / or a filter coefficient for the second filtered residual sample.
[0508] In one embodiment, the image decoding device (2000) may apply filter coefficients for a first filtered residual sample obtained based on information about adaptive loop filtering to the first filtered residual sample. The image decoding device (2000) may apply filter coefficients for the first filtered residual sample obtained based on information about adaptive loop filtering to the second filtered residual sample. The image decoding device (2000) may obtain an adaptive loop filtered sample by using a value obtained by applying the filter coefficients for the first filtered residual sample to the first filtered residual sample and a value obtained by applying the filter coefficients for the second filtered residual sample to the second filtered residual sample.
[0509] In one embodiment, to obtain an adaptive loop filtered sample, the method disclosed in FIGS. 28 to 30 below may be used to obtain an adaptive loop filtered sample.
[0510] In one embodiment, the in-loop filtering of FIG. 27 can achieve the effect of subjective or objective image quality improvement of an image.
[0511] FIG. 28 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0512] In one embodiment, the in-loop filtering unit (2800) can perform at least one of deblocking filtering (2810), sample adaptive offset filtering (2820), bidirectional filtering (2825), and adaptive loop filtering (2830).
[0513] In one embodiment, the in-loop filtering unit (2800) of FIG. 28 may correspond to the deblocking filtering (2810), sample adaptive offset filtering (2820), and bidirectional filtering (2825) of FIG. 24, respectively, and therefore, the same description is omitted.
[0514] In one embodiment, information (2840) on whether to use the APS filter set of FIG. 28, filtering using a predefined filter set (2850), a first classifier (2852), a first filtering (2854), a second classifier (2856), a second filtering (2858), a third classifier (2860), a third filtering (2870), a first filtering (2880), and APS filtering (2890) may correspond to information (2440) on whether to use the APS filter set of FIG. 24, filtering using a predefined filter set (2450), a first classifier (2452), a first filtering (2454), a second classifier (2456), a second filtering (2458), a third classifier (2460), a third filtering (2470), a first filtering (2480), and APS filtering (2490), and thus the same description is omitted.
[0515] In one embodiment, the first filtering (2880) and the second filtering (2882) of FIG. 28 may correspond to the first filtering (2780) and the second filtering (2782) of FIG. 27, respectively, and therefore, the same description is omitted.
[0516] In one embodiment, the image decoding device (2000) can obtain a third filtered residual block by performing third filtering (2884) using the residual block for the current block and the third filter. The image decoding device (2000) can obtain a third filtered residual sample corresponding to the current sample by performing filtering using the residual sample for the current sample and the third filter. The image decoding device (2000) can obtain a third filtered residual block including the third filtered residual sample corresponding to the current sample by filtering the residual block using the third filter.
[0517] Additionally, the image decoding device (2000) can obtain the third filtered residual block based on performing filtering using at least one or all samples included in the residual block in a manner identical or similar to the manner in which the third filtered residual sample was obtained.
[0518] In one embodiment, the image decoding device (2000) can obtain a third filtered residual sample by performing filtering using the residual sample and the third filter. The image decoding device (2000) can obtain the third filtered residual sample by performing filtering using predefined filter coefficients for the residual sample and the third filter.
[0519] In one embodiment, the image decoding device (2000) may obtain a third filtered residual sample by performing filtering using a residual sample corresponding to a predefined filter coefficient for third filtering (2884) on a residual block or a residual sample and at least one sample among surrounding samples of the residual sample and a third filter. Meanwhile, the third filter may use a predefined filter coefficient for third filtering (2884).
[0520] For example, the image decoding device (2000) can obtain a third filtered residual sample by adding each value obtained by applying a predefined filter coefficient for the third filter to at least one of the residual sample and the surrounding samples of the residual sample, each corresponding to the sample.
[0521] In one embodiment, the image decoding device (2000) can obtain a third filtered intermediate filtered block by performing third filtering (2886) using the intermediate filtered block for the current block and the third filter. The image decoding device (2000) can obtain a third filtered intermediate filtered sample corresponding to the current sample by performing filtering using the intermediate filtered sample for the current sample and the third filter. The image decoding device (2000) can obtain a third filtered intermediate filtered block including the third filtered intermediate filtered sample corresponding to the current sample by filtering the intermediate filtered block using the third filter.
[0522] Additionally, the image decoding device (2000) can obtain the third filtered intermediate filtered block based on performing filtering using at least one or all samples included in the intermediate filtered block in a manner identical or similar to the manner in which the third filtered intermediate filtered sample was obtained.
[0523] In one embodiment, the image decoding device (2000) can obtain a third filtered intermediate filtered sample by performing filtering using the intermediate filtered sample and the third filter. The image decoding device (2000) can obtain a third filtered residual sample by performing filtering using predefined filter coefficients for the intermediate filtered sample and the third filter.
[0524] In one embodiment, the image decoding device (2000) may obtain a third filtered intermediate filtered sample by performing filtering using a third filter and an intermediate filter corresponding to a predefined filter coefficient for third filtering (2886) on the intermediate filtered block or intermediate filtered sample. Meanwhile, as the third filter, the third filter
[0525] For example, the image decoding device (2000) can obtain a third filtered intermediate filtered sample by using a value obtained by applying a predefined filter coefficient for the third filter to the intermediate filtered sample.
[0526] Meanwhile, the third filtering (2884) for the residual block and the third filtering (2886) for the intermediate filtered block may be filtering using a filter identical to or similar to the third filter, which is a predefined filter used in the third filtering (2870) for the restored block. For example, the third filtering (2884) or the third filtering (2886) may be filtering using all or part of the filter coefficients used in the third filtering (2870).
[0527] In one embodiment, the image decoding device can perform adaptive loop filtering (2830) by performing APS filtering (2890). The image decoding device (2000) can perform APS filtering using the third filtered residual sample. The image decoding device (2000) can obtain an adaptive loop filtered sample by performing APS filtering (2890). The image decoding device (2000) can obtain the APS filtered sample obtained by performing APS filtering (2890) as an adaptive loop filtered sample for the current sample.
[0528] For example, the image decoding device (2000) can perform APS filtering (2890) using the APS filter obtained based on the third filtered residual sample and information about adaptive loop filtering.
[0529] In one embodiment, the image decoding device (2000) may obtain an adaptive loop filtered sample by using at least one adaptive filter coefficient obtained from information about a third filtered residual sample and adaptive loop filtering. Meanwhile, the at least one adaptive filter coefficient may include a filter coefficient for the third filtered residual sample.
[0530] In one embodiment, the image decoding device (2000) may apply filter coefficients for a third filtered residual sample obtained based on information about adaptive loop filtering to the third filtered residual sample. The image decoding device (2000) may obtain an adaptive loop filtered sample by using a value obtained by applying the filter coefficients for the third filtered residual sample to the third filtered residual sample. In one embodiment, the image decoding device (2000) may perform adaptive loop filtering (2830) by performing APS filtering (2890). The image decoding device (2000) may perform APS filtering by using the third filtered intermediate filtered sample.
[0531] For example, the image decoding device (2000) can perform APS filtering (2890) using the APS filter obtained based on the third filtered intermediate filtered sample and information about adaptive loop filtering.
[0532] In one embodiment, the image decoding device (2000) may obtain an adaptive loop filtered sample by using at least one adaptive filter coefficient obtained from information about a third filtered intermediate filtered sample and adaptive loop filtering. Meanwhile, the at least one adaptive filter coefficient may include a filter coefficient for the third filtered intermediate filtered sample.
[0533] In one embodiment, the image decoding device (2000) may apply filter coefficients for a third filtered intermediate filtered sample obtained based on information about adaptive loop filtering to the third filtered intermediate filtered sample. The image decoding device (2000) may obtain an adaptive loop filtered sample by using a value obtained by applying the filter coefficients for the third filtered intermediate filtered sample to the third filtered intermediate filtered sample.
[0534] In one embodiment, the in-loop filtering of FIG. 28 can achieve the effect of subjective or objective image quality improvement.
[0535] FIG. 29 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0536] In one embodiment, the in-loop filtering unit (2900) can perform at least one of deblocking filtering (2910), sample adaptive offset filtering (2920), bidirectional filtering (2925), and adaptive loop filtering (2930).
[0537] In one embodiment, the in-loop filtering unit (2900) of FIG. 29 may correspond to the deblocking filtering (2910), sample adaptive offset filtering (2920), and bidirectional filtering (2925) of FIG. 24, respectively, and therefore, the same description is omitted.
[0538] In one embodiment, information (2940) on whether to use the APS filter set of FIG. 29, filtering using a predefined filter set (2950), a first classifier (2952), a first filtering (2954), a second classifier (2956), a second filtering (2958), a third classifier (2860), a third filtering (2970), a first filtering (2980), and APS filtering (2990) may correspond to information (2440) on whether to use the APS filter set of FIG. 24, filtering using a predefined filter set (2450), a first classifier (2452), a first filtering (2454), a second classifier (2456), a second filtering (2458), a third classifier (2460), a third filtering (2470), a first filtering (2480), and APS filtering (2490), and therefore, the same description is omitted.
[0539] In one embodiment, the image decoding device (2000) can obtain a first filter by inputting at least one of a restoration block, an intermediate filtered block, and a residual block to a first classifier (2952). The first filter used for the first filtering (2954) can be determined based on at least one of the restoration block, the intermediate filtered block, and the residual block. Meanwhile, the image decoding device (2000) can obtain an intermediate filtered block by filtering the restoration block with at least one of a deblocking filter, a sample adaptive offset filter, and a bilateral filter.
[0540] In one embodiment, the first classifier (2452) may receive at least one of a restored block, an intermediate filtered block, and a residual block as input and determine the class of the current block. For example, the first classifier (2452) may determine directionality and activity based on the restored block or may determine directionality and activity based on the residual block to determine the class of the current block. Alternatively, the first classifier (2452) may use sample values included in the restored block or sample values included in the residual block as parameters for determining the class of the current block.
[0541] In one embodiment, the image decoding device (2000) may obtain a second filter by inputting at least one of a restoration block, an intermediate filtered block, and a residual block to a second classifier (2956). The second filter used for the second filtering (2958) may be determined based on at least one of the restoration block, the intermediate filtered block, and the residual block.
[0542] In one embodiment, the second classifier (2456) may receive at least one of a restored block, an intermediate filtered block, and a residual block as input and determine the class of the current block. For example, the second classifier (2456) may determine directionality and activity based on the restored block or may determine directionality and activity based on the residual block to determine the class of the current block. Alternatively, the second classifier (2456) may use sample values included in the restored block or sample values included in the residual block as parameters for determining the class of the current block.
[0543] In one embodiment, the image decoding device (2000) may obtain at least one APS filter set and an APS index. Each APS filter set may include classifier information indicating which type of classifier to use to determine a class. For example, the image decoding device (2000) may use one of a Laplacian classifier, a band-based classifier, and a residual-based classifier as a third classifier, depending on the classifier information included in the APS filter set indicated by the APS index.
[0544] In one embodiment, the image decoding device (2000) can obtain an APS filter by inputting at least one of a restoration block, an intermediate filtered block, and a residual block to a third classifier (2960). The APS filter (adaptive filter) used for APS filtering (2990) can be determined based on at least one of the restoration block, the intermediate filtered block, and the residual block.
[0545] In one embodiment, the image decoding device (2000) can perform adaptive loop filtering (2930) by performing APS filtering (2990). The image decoding device (2000) can perform filtering using an APS filter determined based on at least one of a reconstructed block, an intermediate filtered block, and a residual block. The image decoding device (2000) can perform filtering using an APS filter. The image decoding device (2000) can obtain adaptive loop filtered samples using an adaptive filter determined based on a differential block.
[0546] In one embodiment, the third classifier (2460) may receive at least one of a restored block, an intermediate filtered block, and a residual block as input, and determine the class of the current block. For example, when the image decoding device (2000) uses a Laplacian classifier as the third classifier (2460), the image decoding device (2000) may determine directionality and activity based on the restored block or may determine directionality and activity based on the residual block to determine the class of the current block. The image decoding device (2000) may use a sample value included in the restored block or a sample value included in the residual block as a parameter for determining the class of the current block in the third classifier (2460).
[0547] In one embodiment, the in-loop filtering of FIG. 29 can achieve the effect of subjective or objective image quality improvement.
[0548] FIG. 30 is a diagram illustrating adaptive loop filtering performed in an in-loop filtering unit according to one embodiment.
[0549] In one embodiment, the in-loop filtering unit (3000) can perform at least one of deblocking filtering (3010), sample adaptive offset filtering (3020), bidirectional filtering (3025), and adaptive loop filtering (3030).
[0550] In one embodiment, the in-loop filtering unit (3000) of FIG. 30 may correspond to the deblocking filtering (3010), sample adaptive offset filtering (3020), and bidirectional filtering (3025) of FIG. 24, respectively, and therefore, the same description is omitted.
[0551] In one embodiment, information (3040) on whether to use the APS filter set of FIG. 30, filtering using a predefined filter set (3050), a first classifier (3052), a first filtering (3054), a second classifier (3056), a second filtering (3058), a third classifier (2860), a third filtering (3070), a first filtering (3080), and APS filtering (3090) may correspond to information (2440) on whether to use the APS filter set of FIG. 24, filtering using a predefined filter set (2450), a first classifier (2452), a first filtering (2454), a second classifier (2456), a second filtering (2458), a third classifier (2460), a third filtering (2470), a first filtering (2480), and APS filtering (2490), and thus the same description is omitted.
[0552] In one embodiment, the image decoding device (2000) may perform APS filtering based on a difference block representing the difference between a residual block and an intermediate filtered block. In one embodiment, the image decoding device (2000) may input the difference block to a first classifier (3052) to obtain a first filter. The first filter used for the first filtering (3054) may be determined based on the difference block.
[0553] In one embodiment, the first classifier (3052) may receive a differential block as input and determine the class of the current block. For example, the first classifier (3052) may determine directionality and activity based on the differential block to determine the class of the current block. Alternatively, the first classifier (3052) may utilize sample values contained in the differential block as parameters for determining the class of the current block.
[0554] In one embodiment, the image decoding device (2000) can obtain a second filter by inputting a differential block to a second classifier (3056). The second filter used for second filtering (3058) can be determined based on the differential block.
[0555] In one embodiment, the second classifier (3056) may receive a differential block as input and determine the class of the current block. For example, the second classifier (3056) may determine directionality and activity based on the differential block to determine the class of the current block. Alternatively, the second classifier (3056) may utilize sample values contained in the differential block as parameters for determining the class of the current block.
[0556] In one embodiment, the image decoding device (2000) can obtain an APS filter by inputting a differential block to a third classifier (3060). The APS filter used for APS filtering (3090) can be determined based on the differential block.
[0557] In one embodiment, the image decoding device (2000) can perform filtering using an APS filter determined based on a differential block. The image decoding device (2000) can perform adaptive loop filtering by performing APS filtering using the APS filter.
[0558] In one embodiment, the third classifier (3060) may receive a differential block as input and determine the class of the current block. For example, when the image decoding device (2000) uses a Laplacian classifier as the third classifier (3060), the image decoding device (2000) may determine directionality and activity based on the differential block to determine the class of the current block. The image decoding device (2000) may use sample values included in the differential block as parameters for determining the class of the current block in the third classifier (3060).
[0559] In one embodiment, the image decoding device can perform adaptive loop filtering (3030) by performing APS filtering (3090). The image decoding device (2000) can perform APS filtering (3090) on the current block using a differential block including a differential sample corresponding to the current sample.
[0560] In one embodiment, the image decoding device (2000) can perform APS filtering (3090) using differential samples and an APS filter. The image decoding device (2000) can perform APS filtering (3090) by applying the APS filter to the differential samples and surrounding samples of the differential samples. In addition, the image decoding device (2000) can obtain an APS filtered block obtained by performing APS filtering (3090) as a filtered block for the current block.
[0561] In one embodiment, the image decoding device may obtain an adaptive loop-filtered sample using at least one adaptive filter coefficient obtained from information about differential samples and adaptive loop filtering. Meanwhile, the at least one adaptive filter coefficient may include a filter coefficient for the differential sample.
[0562] In one embodiment, the image decoding device (2000) may apply filter coefficients for differential samples obtained based on information about adaptive loop filtering to differential samples. The image decoding device (2000) may obtain adaptively loop-filtered samples using values obtained by applying filter coefficients for differential samples to differential samples.
[0563] In one embodiment, the in-loop filtering of FIG. 30 can achieve the effect of subjective or objective image quality improvement.
[0564] Figure 31 is a flowchart of an image decoding method according to one embodiment.
[0565] In step S3110, the image decoding device (2000) can obtain information about adaptive loop filtering from the bitstream. The image decoding device (2000) can obtain information about adaptive loop filtering from the adaptive parameter set. The image decoding device (2000) can obtain information about adaptive loop filtering from the slice header.
[0566] In one embodiment, the image decoding device (2000) can obtain information indicating whether to perform adaptive loop filtering included in the information regarding adaptive loop filtering. The image decoding device (2000) can obtain information regarding whether to use an APS filter set included in the information regarding adaptive loop filtering. The image decoding device (2000) can obtain a filter set index included in the information regarding adaptive loop filtering.
[0567] In one embodiment, the image decoding device (2000) may obtain information on whether to obtain a current APS filter set included in information about adaptive loop filtering. The image decoding device (2000) may obtain information on the number of filters included in each current APS filter set included in information about adaptive loop filtering. The image decoding device (2000) may obtain information on at least one APS filter included in a current APS filter set included in information about adaptive loop filtering. The image decoding device (2000) may obtain an APS index included in information about adaptive loop filtering.
[0568] Meanwhile, without being limited to the disclosed examples, information regarding adaptive loop filtering may include information necessary to perform adaptive loop filtering.
[0569] In step S3120, the image decoding device (2000) can obtain a first filtered residual sample corresponding to the current sample by performing filtering using the residual block and the first filter for the current sample.
[0570] In one embodiment, the image decoding device (2000) can perform first filtering using a residual block and a first filter. The image decoding device (2000) can obtain a first filtered residual block including a first filtered residual sample by performing the first filtering using the residual block and the first filter.
[0571] In one embodiment, the image decoding device (2000) may obtain a first filtered residual sample by performing filtering using a residual sample and a first filter corresponding to a predefined filter coefficient for first filtering on a residual block or residual sample. Meanwhile, the first filter may be expressed as a predefined filter coefficient for first filtering.
[0572] For example, the image decoding device (2000) may obtain a first filtered residual sample by adding each value obtained by applying a predefined filter coefficient for the first filter to at least one of the residual sample and the surrounding samples of the residual sample, corresponding to each sample. Meanwhile, without being limited to the disclosed example, the image decoding device (2000) may obtain the first filtered residual sample by using a value obtained by multiplying the residual sample by a predefined filter coefficient.
[0573] Hereinafter, step S3120 is specifically described in FIGS. 21 to 30, so the same content is omitted.
[0574] In step S3130, the image decoding device (2000) can obtain a second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual sample and the second filter.
[0575] In one embodiment, the image decoding device (2000) may perform second filtering using the first filtered residual block and the second filter. The image decoding device (2000) may obtain a second filtered residual block including second filtered residual samples by performing the second filtering using the first filtered residual block and the second filter.
[0576] In one embodiment, the image decoding device (2000) may obtain a second filtered residual sample by performing filtering using a first filtered residual sample and a second filter corresponding to predefined filter coefficients for second filtering on the first filtered residual block or the first filtered residual sample. Meanwhile, the second filter may be expressed as predefined filter coefficients for the second filtering.
[0577] For example, the image decoding device (2000) can obtain a second filtered residual sample by applying a predefined filter coefficient for a second filter to the first filtered residual sample. Meanwhile, without being limited to the disclosed example, the image decoding device (2000) can obtain a second filtered residual sample by using a value obtained by multiplying the first filtered residual sample by a predefined filter coefficient value.
[0578] Hereinafter, step S3130 is specifically described in FIGS. 21 to 30, so the same content is omitted.
[0579] In step S3140, the image decoding device (2000) can obtain an adaptive loop filtered sample by using the first filtered residual sample, the second filtered residual sample, and at least one adaptive filter coefficient obtained from information about adaptive loop filtering.
[0580] In one embodiment, the image decoding device (2000) may determine to perform adaptive loop filtering based on information indicating whether to perform adaptive loop filtering included in the information regarding adaptive loop filtering. The image decoding device (2000) may determine to perform adaptive loop filtering using an APS filter set based on information indicating whether to use an APS filter set included in the information regarding adaptive loop filtering.
[0581] In one embodiment, the image decoding device (2000) may obtain at least one current APS filter set included in information regarding adaptive loop filtering. The image decoding device (2000) may determine an APS filter set to be used for filtering a current block among the at least one APS filter set using an APS index included in the information regarding adaptive loop filtering.
[0582] In one embodiment, the image decoding device (2000) may perform APS filtering using an APS filter determined based on at least one of a reconstruction block, an intermediate block, a residual block, and a difference block. In order to perform APS filtering, the image decoding device (2000) may determine at least one APS filter included in an APS filter set as an APS filter for adaptive loop filtering using a class determined based on at least one of a reconstruction block, an intermediate filtered block, a residual block, and a difference block.
[0583] In one embodiment, the image decoding device (2000) may perform filtering using an APS filter determined based on a differential block representing a difference between a reconstructed block and an intermediate filtered block. In order to perform adaptive loop filtering, the image decoding device (2000) may determine one APS filter among at least one APS filter included in an APS filter set using a class determined based on the differential block.
[0584] In one embodiment, the image decoding device (2000) may determine one APS filter for APS filtering based on the determined APS filter set and the class of the current block. The image decoding device (2000) may perform adaptive loop filtering using the determined APS filter, the first filtered residual sample, and the second filtered residual sample, thereby obtaining an adaptive loop filtered sample.
[0585] In one embodiment, the image decoding device (2000) can obtain an adaptive loop-filtered sample by using a value obtained by adding an intermediate filtered sample to a product of at least one adaptive filter coefficient included in an APS filter determined for the first filtered residual sample and the second filtered residual sample. The image decoding device (2000) can obtain an adaptive loop-filtered block by obtaining adaptive loop-filtered samples for at least one sample or all samples included in a current block.
[0586] In one embodiment, the image decoding device (2000) can obtain a third filtered residual sample corresponding to the current sample by performing filtering using the residual sample and the third filter.
[0587] In one embodiment, the video decoding device (2000) may obtain an adaptive loop-filtered sample by performing APS filtering using the third filtered residual sample and at least one adaptive filter coefficient. For example, the video decoding device (2000) may obtain an adaptive loop-filtered sample by using a value obtained by adding to an intermediate filtered sample a product of APS filter coefficients included in an APS filter determined for the third filtered residual sample and at least one of the surrounding samples of the third filtered residual sample. In one embodiment, the video decoding device (2000) may obtain an adaptive loop-filtered sample by performing APS filtering using the third filtered intermediate filtered sample and at least one adaptive filter coefficient. For example, the video decoding device (2000) may obtain an adaptive loop-filtered sample by using a value obtained by adding to an intermediate filtered sample a product of APS filter coefficients included in an APS filter determined for the third filtered residual sample and at least one of the surrounding samples of the third filtered residual sample.
[0588] Hereinafter, step S3140 has been specifically described in FIGS. 21 to 30, so the same content is omitted.
[0589] Fig. 32 is a block diagram illustrating a configuration of an image encoding device according to one embodiment.
[0590] Referring to FIG. 32, the image encoding device (3200) may include a prediction encoding unit (3210) and a generation unit (3230).
[0591] According to one embodiment, the prediction encoding unit (3210) and the generation unit (3230) may be implemented with at least one processor. In one embodiment, the prediction encoding unit (3210) and the generation unit (3230) may operate according to at least one instruction stored in at least one memory.
[0592] In one embodiment, the image encoding device (3200) may include at least one memory that stores input / output data of the prediction encoding unit (3210) and the generation unit (3230). In addition, the image encoding device (3200) may include a memory control unit that controls data input / output of the memory.
[0593] In one embodiment, the prediction encoding unit (3210) may correspond to the prediction encoding unit (1915) illustrated in FIG. 19, and the generation unit (3230) may correspond to the entropy encoding unit (1925) illustrated in FIG. 19.
[0594] In one embodiment, the prediction encoding unit (3210) can obtain a divided slice by splitting one slice into at least one. The prediction encoding unit (3210) can determine at least one APS filter for at least one block included in the divided slice. The prediction encoding unit (3210) can obtain an APS filter set including the determined at least one APS filter. The prediction encoding unit (3210) can obtain an APS filter set from each of the divided slices.
[0595] In one embodiment, the prediction encoder (3210) may determine at least one APS filter coefficient corresponding to at least one preset tap to determine an APS filter.
[0596] In one embodiment, the prediction encoding unit (3210) may determine at least one APS filter coefficient included in at least one tap among a spatial tap, a first filter tap, a second filter tap, a third filter tap, a restoration tap, a residual tap, a first residual filter tap, a second residual filter tap, a third residual filter tap, and a third intermediate filter tap, or corresponding to at least one tap.
[0597] In one embodiment, the prediction encoding unit (3210) may determine which filter to use for the current block among APS filters included in at least one APS filter set and filters included in at least one predefined filter set. The prediction encoding unit (3210) may determine a filter that generates a filtered block having a small difference from an original block as a filter for adaptive loop filtering of the current block among a filtered block obtained by performing adaptive loop filtering using an APS filter included in at least one APS filter set and a filtered block obtained by performing adaptive loop filtering using a filter included in at least one predefined filter set.
[0598] In one embodiment, the prediction encoding unit (3210) may determine to use an APS filter to perform adaptive loop filtering on a current block. The prediction decoding unit (3210) may determine or obtain information about adaptive loop filtering required to obtain an APS filter from the prediction encoding unit (2030). The information about adaptive loop filtering may include at least one of whether to obtain a current APS filter set, the number of filters included in the current APS filter set, at least one APS filter included in the current APS filter set, and an APS index. The current block may be a maximum coding unit, a coding unit, a transformation unit, a prediction unit, or a filtering unit divided from a current image to be encoded.
[0599] In one embodiment, the prediction encoding unit (3210) may determine to use a filter included in a predefined filter set to perform adaptive loop filtering on the current block. The prediction decoding unit (3210) may determine or obtain information regarding adaptive loop filtering required to obtain an APS filter from the prediction encoding unit (2030). The information regarding adaptive loop filtering may include a filter set index.
[0600] In one embodiment, the prediction encoding unit (3210) compares the difference between the filtered block obtained by performing adaptive loop filtering and the original block with the difference between the intermediate filtered block and the original block, and if it is determined that it is not appropriate to use adaptive loop filtering, the prediction encoding unit (3210) can determine information indicating whether to perform adaptive loop filtering by not performing adaptive loop filtering.
[0601] In one embodiment, the prediction encoding unit (3210) may determine information indicating whether to perform adaptive loop filtering by performing adaptive loop filtering when the filter for adaptive loop filtering of the determined current block is an APS filter included in at least one APS filter, or a filter included in at least one predefined filter set.
[0602] In one embodiment, the prediction encoding unit (3210) may determine a filter set index if the filter for adaptive loop filtering of the current block is a filter included in at least one predefined filter set, and may determine information on whether to use the APS filter set by not using the APS filter set.
[0603] In one embodiment, the prediction encoding unit (3210) may determine at least one of information on whether to acquire a current APS filter set, information on the number of filters included in each current APS filter set, information on at least one APS filter included in the current APS filter set, and an APS index, when the filter for adaptive loop filtering of the current block is an APS filter included in at least one APS filter set.
[0604] In one embodiment, the predictive encoding unit (3210) may generate a bitstream including information about adaptive loop filtering, including at least one of information indicating whether to perform adaptive loop filtering, information on whether to use an APS filter set, and a filter set index.
[0605] In one embodiment, the predictive encoding unit (3210) may generate a bitstream including information indicating whether to perform adaptive loop filtering, information on whether to acquire a current APS filter set, information on the number of filters included in each current APS filter set, information on at least one APS filter included in the current APS filter set, and information on adaptive loop filtering including at least one APS index.
[0606] In one embodiment, at least one piece of information included in the information regarding adaptive loop filtering may be included as a flag or an index.
[0607] In one embodiment, at least some of the information regarding adaptive loop filtering may be included in a sequence parameter set, a picture parameter set, an adaptive parameter set, a slice header, or slice data of the bitstream.
[0608] In one embodiment, the predictive encoding unit (3210) may determine information regarding adaptive loop filtering for the current block according to a predetermined method. In this case, information regarding adaptive loop filtering may not be included in the bitstream.
[0609] In one embodiment, encoding of a current block may refer to a process of generating information that enables the image decoding device (2000) to restore the current block. The information generated through encoding may be included in a bitstream.
[0610] In one embodiment, the generation unit (3230) may generate a bitstream including an encoding result of an image. The bitstream may include an encoding result for a current block.
[0611] In one embodiment, the generation unit (3230) can transmit the bitstream to the image decoding device (2000) over a network.
[0612] In one embodiment, the generation unit (3230) may store the bitstream on a data storage medium including a magnetic medium such as a hard disk, a floppy disk, and a magnetic tape, an optical recording medium such as a CD-ROM and a DVD, a magneto-optical medium such as a floptical disk, and the like.
[0613] In one embodiment, the generation unit (3230) may generate a bitstream including syntax elements generated through encoding of an image. Values corresponding to the syntax elements may be included in the bitstream according to the hierarchical structure of the image.
[0614] In one embodiment, bit strings generated by the generation unit (3230) by entropy encoding syntax elements may be included in the bitstream.
[0615] In one embodiment, the bitstream may include information regarding adaptive loop filtering of the current block within the current image. Furthermore, the information regarding the adaptive loop filtering may be determined based on at least one APS filter set. Since the information regarding the adaptive loop filtering has been previously described, a detailed description thereof will be omitted.
[0616] In one embodiment, the operation of the image encoding device (3200) may be identical to the operation of the image decoding device (2000), and therefore, the description of the operation of the image decoding device (2000) described above may be equally applicable to the image encoding device (3200).
[0617] In one embodiment, the operation of the prediction encoding unit (3210) of the image encoding device (3200) may be the same as the operation of the prediction decoding unit (2030) of the image decoding device (2000), so the description of the operation of the prediction decoding unit (2030) described above may be equally applied to the prediction encoding unit (3210).
[0618] Figure 33 is a flowchart of an image encoding method according to one embodiment.
[0619] In step S3310, the image encoding device (3200) can obtain a first filtered residual sample corresponding to the current sample by performing filtering using the residual sample and the first filter for the current sample.
[0620] In one embodiment, the video encoding device (3200) may filter the residual block for the current block using a first filter. For example, the video encoding device (3200) may determine, from among the filters included in the first predefined filter set, a first filter corresponding to a class determined based on the current block.
[0621] In one embodiment, the video encoding device (3200) can obtain a first filtered residual block by performing first filtering using a residual block and a first filter. The video encoding device (3200) can obtain a first filtered residual block including a first filtered residual sample corresponding to a current sample by filtering the residual block using the first filter. The video encoding device (3200) can obtain a first filtered residual sample by filtering the residual sample using the first filter.
[0622] In one embodiment, the video encoding device (3200) may obtain a first filtered residual sample by performing filtering using predefined filter coefficients and residual samples corresponding to the predefined filter coefficients for first filtering on a residual block or residual sample. Meanwhile, the predefined filter coefficients for first filtering on a residual block may be at least one filter coefficient included in a first filter.
[0623] For example, the image encoding device (3200) can obtain a value of the first filtered residual sample by calculating the inner product of the values of at least one filter coefficient for the first filtering and at least one sample among the surrounding samples of the residual sample, respectively, corresponding to the at least one filter coefficient for the first filtering.
[0624] In step S3320, the image encoding device (3200) can obtain a second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual sample and the second filter.
[0625] In one embodiment, the video encoding device (3200) may filter the first filtered residual block using a second filter. For example, the video encoding device (3200) may determine, from among the filters included in the second predefined filter set, a second filter corresponding to a class determined based on the current block.
[0626] In one embodiment, the video encoding device (3200) can obtain a second filtered residual block by performing second filtering using the first filtered residual block and the second filter. The video encoding device (3200) can obtain a second filtered residual block including a second filtered residual sample corresponding to a current sample by filtering the first filtered residual block using the second filter. The video encoding device (3200) can obtain a second filtered residual sample by filtering the first filtered residual sample using the second filter.
[0627] In one embodiment, the video encoding device (3200) may obtain a second filtered residual sample by performing filtering using predefined filter coefficients for second filtering on a first filtered residual block or residual sample and a first filtered residual sample corresponding to the predefined filter coefficients. Meanwhile, the predefined filter coefficients for second filtering on the first filtered residual block may be at least one filter coefficient included in the second filter.
[0628] For example, the image encoding device (3200) can obtain a value of the second filtered residual sample by taking the product of the values of at least one sample among the surrounding samples of the first filtered residual sample and the first filtered residual sample, each corresponding to at least one filter coefficient for the second filtering and at least one filter coefficient for the second filtering, as the value of the second filtered residual sample.
[0629] In step S3330, the video encoding device (3200) may determine at least one adaptive filter coefficient for performing adaptive loop filtering using the first filtered residual sample and the second filtered residual sample. The at least one adaptive filter coefficient for performing the adaptive loop filtering may be expressed as an APS filter or an adaptive filter.
[0630] In one embodiment, the video encoding device (3200) may determine at least one APS filter to apply to the first filtered residual sample and the second filtered residual sample. The video encoding device (3200) may determine an APS filter set including at least one APS filter.
[0631] In one embodiment, the video encoding device (3200) can obtain the divided slices by dividing one slice into at least one. The video encoding device (3200) can determine at least one APS filter for at least one block included in the divided slice. The video encoding device (3200) can obtain an APS filter set including the determined at least one APS filter. The video encoding device (3200) can obtain an APS filter set from each of the divided slices. The video encoding device can obtain or determine at least one APS filter set for one slice. The video encoding device can obtain or determine at least one APS filter set including filter coefficients for performing APS filtering on a current block.
[0632] For example, the video encoding device (3200) can divide one slice into four. The video encoding device (3200) can determine 25 APS filters for at least one block included in the four divided slices, and obtain an APS filter set including the 25 APS filters. The video encoding device (3200) can obtain an APS filter set including the 25 APS filters from each of the four divided slices.
[0633] In one embodiment, the video encoding device (3200) may determine at least one adaptive filter coefficient for samples corresponding to the position of at least one preset tap to determine an APS filter.
[0634] In one embodiment, the video encoding device (3200) may determine at least one adaptive filter coefficient included in, or corresponding to, at least one tap among a spatial tap, a first filter tap, a second filter tap, a third filter tap, a restoration tap, a residual tap, a first residual filter tap, a second residual filter tap, a third residual filter tap, and a third intermediate filter tap, a difference tap.
[0635] In one embodiment, the video encoding device (3200) includes: an intermediate filtered sample included in a spatial tap and surrounding samples of the intermediate filtered sample, a first filtered sample corresponding to a first filter tap and surrounding samples of the first filtered sample, a second filtered sample corresponding to a second filter tap and surrounding samples of the second filtered sample, a third filtered sample corresponding to a third filter tap and surrounding samples of the third filtered sample, a restored sample corresponding to a restoration tap and surround...
Claims
1. In an image decoding method for adaptive loop filtering, Step (S3110) of obtaining information about adaptive loop filtering from a bitstream; A step of obtaining a first filtered residual sample corresponding to the current sample by performing filtering using a residual sample and a first filter for the current sample (S3120); A step of obtaining a second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual sample and the second filter (S3130); An image decoding method, comprising the step of obtaining an adaptive loop filtered sample (S3140) by using at least one adaptive filter coefficient obtained from the first filtered residual sample, the second filtered residual sample, and the information about the adaptive loop filtering.
2. In paragraph 1, Further comprising a step of obtaining a third filtered residual sample corresponding to the current sample by performing filtering using the residual sample and the third filter, The step of obtaining the above adaptive loop filtered sample (S3140) is: An image decoding method, comprising the step of obtaining the adaptive loop filtered sample by using the third filtered residual sample and the at least one adaptive filter coefficient.
3. In any one of paragraphs 1 to 2, A step of obtaining a third filtered intermediate filtered sample corresponding to the current sample by performing filtering using the intermediate filtered sample obtained by performing at least one of deblocking filtering (2410, 2710, 2810, 2910, 3010), sample adaptive offset filtering (2420, 2720, 2820, 2920, 3030), and bidirectional filtering (2425, 2725, 2825, 2925, 3025) on a restoration block for the current block including the current sample is further included, The step of obtaining the above adaptive loop filtered sample (S3140) is: An image decoding method, comprising the step of obtaining the adaptive loop filtered sample by using the third filtered intermediate filtered sample and the at least one adaptive filter coefficient.
4. In any one of paragraphs 1 to 3, The first and second filters are, A method for decoding an image, wherein the method comprises determining a reconstruction block for a current block including the current sample, an intermediate filtered block obtained by performing at least one of deblocking filtering (2410, 2710, 2810, 2910, 3010), sample adaptive offset filtering (2420, 2720, 2820, 2920, 3030), and bidirectional filtering (2425, 2725, 2825, 2925, 3025) on the reconstruction block, and at least one of a residual block including the residual sample.
5. In any one of paragraphs 1 to 4, The step of obtaining the above adaptive loop filtered sample (S3140) is: A method for decoding an image, comprising: a step of using an adaptive filter determined based on at least one of a reconstruction block for a current block including the current sample, an intermediate filtered block obtained by performing at least one of deblocking filtering (2410, 2710, 2810, 2910, 3010), sample adaptive offset filtering (2420, 2720, 2820, 2920, 3030), and bidirectional filtering (2425, 2725, 2825, 2925, 3025) on the reconstruction block, and a residual block including the residual sample.
6. In any one of paragraphs 1 to 5, The first filter and the second filter are, A method for decoding an image, wherein a difference block is determined based on a difference block representing a difference of an intermediate filtered block obtained by performing at least one of deblocking filtering (2410, 2710, 2810, 2910, 3010), sample adaptive offset filtering (2420, 2720, 2820, 2920, 3030), and bidirectional filtering (2425, 2725, 2825, 2925, 3025) on a restored block for a current block including the current sample.
7. In any one of paragraphs 1 to 6, The step of obtaining the above adaptive loop filtered sample (S3140) is: A method for decoding an image, comprising: a step of using an adaptive filter determined based on a differential block representing a difference of an intermediate filtered block obtained by performing at least one of deblocking filtering (2410, 2710, 2810, 2910, 3010), sample adaptive offset filtering (2420, 2720, 2820, 2920, 3030), and bidirectional filtering (2425, 2725, 2825, 2925, 3025) on a restored block for a current block including the current sample.
8. In any one of paragraphs 6 to 7, The step of obtaining the above adaptive loop filtered sample (S3140) is: An image decoding method, comprising the step of obtaining the adaptive loop filtered sample by using the differential sample included in the differential block and the at least one adaptive filter coefficient.
9. In any one of paragraphs 1 to 8, Information about the above adaptive loop filtering A method of decoding an image, comprising information indicating whether to perform adaptive loop filtering.
10. In any one of paragraphs 1 to 9, Information about the above adaptive loop filtering A method of decoding an image, comprising information on whether to use an adaptive filter set.
11. In any one of paragraphs 1 to 10, Information about the above adaptive loop filtering A method for decoding an image, comprising information about at least one adaptive filter included in an adaptive filter set.
12. In any one of paragraphs 1 to 11, A step of obtaining an intermediate filtered sample corresponding to the current sample by performing at least one of deblocking filtering (2410, 2710, 2810, 2910, 3010), sample adaptive offset filtering (2420, 2720, 2820, 2920, 3030), and bidirectional filtering (2425, 2725, 2825, 2925, 3025) on a restoration block for the current block including the current sample; A step of obtaining a first filtered sample corresponding to the current sample by performing filtering using the restored sample included in the restored block, the intermediate filtered sample, and the first filter; A step of obtaining a second filtered sample corresponding to the current sample by performing filtering using the restored sample, the first filtered sample, and the second filter; and Further comprising a step of obtaining a third filtered sample corresponding to the current sample by performing filtering using the restored sample, the intermediate filtered sample, and the third filter, The step of obtaining the above adaptive loop filtered sample (S3140) is: An image decoding method, comprising the step of obtaining the adaptive loop filtered sample by using the intermediate filtered sample, the first filtered sample, the second filtered sample, the third filtered sample, the reconstructed sample, the residual sample, and the at least one adaptive filter coefficient.
13. In an image encoding method for adaptive loop filtering, A step of obtaining a first filtered residual sample corresponding to the current sample by performing filtering using a residual sample and a first filter for the current sample (S3310); A step of obtaining a second filtered residual sample corresponding to the current sample by performing filtering using the first filtered residual sample and the second filter (S3320); A step (S3330) of determining at least one adaptive filter coefficient for performing adaptive loop filtering on a current block including the current sample using the first filtered residual sample and the second filtered residual sample; and A method for encoding an image, comprising the step of generating (S3340) a bitstream including information about adaptive loop filtering based on at least one adaptive filter coefficient.
14. In paragraph 13, Further comprising a step of obtaining a third filtered residual sample corresponding to the current sample by performing filtering using the residual sample and the third filter, The step of determining at least one adaptive filter coefficient for performing adaptive loop filtering for the current block (S3330) is: A method for decoding an image, comprising: determining at least one adaptive filter coefficient for performing adaptive loop filtering on the current block using the third filtered residual sample.
15. In a computer-readable recording medium that records a bitstream, The above bitstream is, Contains information about adaptive loop filtering, Information about the above adaptive loop filtering is: By performing filtering using the residual sample and the first filter for the current sample, a first filtered residual sample corresponding to the current sample is obtained, By performing filtering using the first filtered residual sample and the second filter, a second filtered residual sample corresponding to the current sample is obtained, determining at least one adaptive filter coefficient for performing adaptive loop filtering on a current block including the current sample using the first filtered residual sample and the second filtered residual sample; A recording medium based on at least one of the above-determined at least one adaptive filter coefficient.
Citation Information
Patent Citations
Coating method for continuous printing process
KR102729792B1
Image filtering apparatus, image decoding apparatus, and image coding apparatus
US20210021820A1
Adaptive loop filter
US20220159249A1
Combined loop filtering
WO2022211693A1
KR20190008230A