Image encoding methods, image decoding methods, bitstream transmission methods, and computer-readable, immutable storage media.

VN100461AActive Publication Date: 2024-01-25INST OF IMAGE TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
VN1202305730
Authority / Receiving Office
VN · VN
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-09-18
Filing Date
2020-09-10
Publication Date
2024-01-25
Estimated Expiration
2040-09-10

AI Technical Summary

Technical Problem

Current video encoding and decoding technologies face inefficiencies in compressing high-resolution images, particularly in adapting filtering techniques across division units, which affects coding/decoding efficiency and image quality.

Method used

The method involves dividing a picture into multiple units such as subpictures, slices, or tiles and using flags to determine whether to apply filtering on the boundaries of these units, considering both the current unit and adjacent units, to adaptively perform deblocking filtering.

Benefits of technology

This approach enhances coding/decoding efficiency and improves image quality by allowing flexible filtering decisions based on unit boundaries, optimizing the process for high-resolution images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure VN1202305730_0
    Figure VN1202305730_0
Patent Text Reader

Abstract

The invention relates to a method and apparatus for encoding / decoding an image that can divide an image into multiple partitions, determine whether to perform filtering on the boundary of the current partition based on a predefined flag, and perform filtering on the boundary of the current partition in response to the determination.
Need to check novelty before this filing date? Find Prior Art

Description

In-loop filter-based image encoding / decoding method and device

[0001] The present invention relates to a method and device for encoding / decoding an image.

[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various application fields, and accordingly, high-efficiency image compression technologies are being discussed.

[0003] There are various technologies for image compression, such as inter prediction technology that predicts pixel values ​​included in the current picture from pictures before or after the current picture, intra prediction technology that predicts pixel values ​​included in the current picture using pixel information within the current picture, and entropy encoding technology that assigns short codes to values ​​with high frequency of appearance and long codes to values ​​with low frequency of appearance, and these technologies can be used to effectively compress and transmit or store image data.

[0004] The purpose of the present invention is to provide a method and device for dividing a picture into predetermined division units.

[0005] The purpose of the present invention is to provide a method and device for adaptively performing filtering on the boundary of a division unit.

[0006] The present invention aims to provide a method and device for applying an improved deblocking filter.

[0007] The video decoding method and device of the present invention can divide one picture into a plurality of division units, determine whether to perform filtering on the boundary of the current division unit based on a predetermined flag, and perform filtering on the boundary of the current division unit in response to the determination.

[0008] In the video decoding method and device of the present invention, the division unit may include at least one of a subpicture, a slice, or a tile.

[0009] In the video decoding method and device of the present invention, the flag may include at least one of a first flag indicating whether filtering is performed on the boundary of a segmentation unit belonging to the one picture or a second flag indicating whether filtering is performed on the boundary of a current segmentation unit within the one picture.

[0010] In the video decoding method and device of the present invention, when the first flag is a first value, filtering may be restricted from being performed on the boundary of a segmentation unit within the one picture, and when the first flag is a second value, the restriction may not be imposed on the boundary of a segmentation unit within the one picture.

[0011] In the image decoding method and device of the present invention, when the second flag is the first value, filtering is restricted from being performed on the boundary of the current segmentation unit, and when the second flag is the second value, filtering can be performed on the boundary of the current segmentation unit.

[0012] In the video decoding method and device of the present invention, the second flag can be decoded only when filtering is not restricted from being performed on the boundary of a segmentation unit within the one picture according to the first flag.

[0013] In the image decoding method and device of the present invention, whether to perform filtering on the boundary of the current division unit can be determined by further considering a third flag regarding whether filtering is performed on the boundary of a neighboring division unit adjacent to the current block unit.

[0014] In the image decoding method and device of the present invention, the position of the neighboring division unit can be determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.

[0015] In the video decoding method and device of the present invention, the step of performing the filtering may include the step of specifying a block boundary for deblocking filtering, the step of deriving a decision value for the block boundary, the step of determining a filter type for the deblocking filtering based on the decision value, and the step of performing filtering on the block boundary based on the filter type.

[0016] The video encoding method and device of the present invention can divide one picture into a plurality of division units, determine whether to perform filtering on the boundary of the current division unit, and perform filtering on the boundary of the current division unit in response to the determination.

[0017] In the video encoding method and device of the present invention, the division unit may include at least one of a subpicture, a slice, or a tile.

[0018] In the video encoding method and device of the present invention, the step of determining whether to perform filtering on the boundary of the current segmentation unit may include the step of encoding at least one of a first flag regarding whether filtering is performed on the boundary of the segmentation unit belonging to the one picture or a second flag regarding whether filtering is performed on the boundary of the current segmentation unit within the one picture.

[0019] In the video encoding method and device of the present invention, when it is determined that filtering is not to be performed on the boundary of a segmentation unit within the one picture, the first flag may be encoded with a first value, and when it is determined that the restriction is not imposed on the boundary of a segmentation unit within the one picture, the first flag may be encoded with a second value.

[0020] In the video encoding method and device of the present invention, if it is determined that filtering is not to be performed on the boundary of the current division unit, the second flag may be encoded with a first value, and if it is determined that filtering can be performed on the boundary of the current division unit, the second flag may be encoded with a second value.

[0021] In the video encoding method and device of the present invention, the second flag can be encoded only when filtering is not restricted from being performed on the boundary of a segmentation unit within the one picture.

[0022] In the video encoding method and device of the present invention, whether to perform filtering on the boundary of the current division unit can be determined by further considering a third flag regarding whether filtering is performed on the boundary of a neighboring division unit adjacent to the current block unit.

[0023] In the image encoding method and device of the present invention, the position of the neighboring division unit can be determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.

[0024] In the video encoding method and device of the present invention, the step of performing the filtering may include the step of specifying a block boundary for deblocking filtering, the step of deriving a decision value for the block boundary, the step of determining a filter type for the deblocking filtering based on the decision value, and the step of performing filtering on the block boundary based on the filter type.

[0025] According to the present invention, encoding / decoding efficiency can be improved by dividing one picture into multiple division units.

[0026] According to the present invention, encoding / decoding efficiency can be improved by adaptively performing filtering on the boundary of a division unit.

[0027] According to the present invention, image quality can be improved by applying an improved deblocking filter to a restored image.

[0028] FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention.

[0029] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.

[0030] FIGS. 3 to 6 illustrate a method of dividing one picture into one or more division units according to the present disclosure.

[0031] FIG. 7 illustrates a method for performing filtering based on a predetermined flag according to the present disclosure.

[0032] FIGS. 8 to 15 illustrate a method for determining whether filtering is performed on the boundary of a segmentation unit based on one or more flags according to the present disclosure.

[0033] Figure 16 illustrates a method of applying a deblocking filter according to the present disclosure.

[0034] The video decoding method and device of the present invention can divide one picture into a plurality of division units, determine whether to perform filtering on the boundary of the current division unit based on a predetermined flag, and perform filtering on the boundary of the current division unit in response to the determination.

[0035] In the video decoding method and device of the present invention, the division unit may include at least one of a subpicture, a slice, or a tile.

[0036] In the video decoding method and device of the present invention, the flag may include at least one of a first flag indicating whether filtering is performed on the boundary of a segmentation unit belonging to the one picture or a second flag indicating whether filtering is performed on the boundary of a current segmentation unit within the one picture.

[0037] In the video decoding method and device of the present invention, when the first flag is a first value, filtering may be restricted from being performed on the boundary of a segmentation unit within the one picture, and when the first flag is a second value, the restriction may not be imposed on the boundary of a segmentation unit within the one picture.

[0038] In the image decoding method and device of the present invention, when the second flag is the first value, filtering is restricted from being performed on the boundary of the current segmentation unit, and when the second flag is the second value, filtering can be performed on the boundary of the current segmentation unit.

[0039] In the video decoding method and device of the present invention, the second flag can be decoded only when filtering is not restricted from being performed on the boundary of a segmentation unit within the one picture according to the first flag.

[0040] In the image decoding method and device of the present invention, whether to perform filtering on the boundary of the current division unit can be determined by further considering a third flag regarding whether filtering is performed on the boundary of a neighboring division unit adjacent to the current block unit.

[0041] In the image decoding method and device of the present invention, the position of the neighboring division unit can be determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.

[0042] In the video decoding method and device of the present invention, the step of performing the filtering may include the step of specifying a block boundary for deblocking filtering, the step of deriving a decision value for the block boundary, the step of determining a filter type for the deblocking filtering based on the decision value, and the step of performing filtering on the block boundary based on the filter type.

[0043] The video encoding method and device of the present invention can divide one picture into a plurality of division units, determine whether to perform filtering on the boundary of the current division unit, and perform filtering on the boundary of the current division unit in response to the determination.

[0044] In the video encoding method and device of the present invention, the division unit may include at least one of a subpicture, a slice, or a tile.

[0045] In the video encoding method and device of the present invention, the step of determining whether to perform filtering on the boundary of the current segmentation unit may include the step of encoding at least one of a first flag regarding whether filtering is performed on the boundary of the segmentation unit belonging to the one picture or a second flag regarding whether filtering is performed on the boundary of the current segmentation unit within the one picture.

[0046] In the video encoding method and device of the present invention, when it is determined that filtering is not to be performed on the boundary of a segmentation unit within the one picture, the first flag may be encoded with a first value, and when it is determined that the restriction is not imposed on the boundary of a segmentation unit within the one picture, the first flag may be encoded with a second value.

[0047] In the video encoding method and device of the present invention, if it is determined that filtering is not to be performed on the boundary of the current division unit, the second flag may be encoded with a first value, and if it is determined that filtering can be performed on the boundary of the current division unit, the second flag may be encoded with a second value.

[0048] In the video encoding method and device of the present invention, the second flag can be encoded only when filtering is not restricted from being performed on the boundary of a segmentation unit within the one picture.

[0049] In the video encoding method and device of the present invention, whether to perform filtering on the boundary of the current division unit can be determined by further considering a third flag regarding whether filtering is performed on the boundary of a neighboring division unit adjacent to the current block unit.

[0050] In the image encoding method and device of the present invention, the position of the neighboring division unit can be determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.

[0051] In the video encoding method and device of the present invention, the step of performing the filtering may include the step of specifying a block boundary for deblocking filtering, the step of deriving a decision value for the block boundary, the step of determining a filter type for the deblocking filtering based on the decision value, and the step of performing filtering on the block boundary based on the filter type.

[0052] The present invention is susceptible to various modifications and embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present invention. Throughout the description of each drawing, similar reference numerals have been used to designate similar components.

[0053] While terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present invention, a first component may be referred to as a "second component," and similarly, a second component may also be referred to as a "first component." The term "and / or" includes a combination of multiple related items described herein or any of multiple related items described herein.

[0054] When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening.

[0055] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0056] Hereinafter, with reference to the attached drawings, preferred embodiments of the present invention will be described in more detail. Hereinafter, identical components in the drawings will be designated by the same reference numerals, and redundant descriptions of identical components will be omitted.

[0057]

[0058] FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention.

[0059] Referring to FIG. 1, a video encoding device (100) may include a picture segmentation unit (110), a prediction unit (120, 125), a transformation unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse transformation unit (145), a filter unit (150), and a memory (155).

[0060] Each component shown in Fig. 1 is independently depicted to indicate different characteristic functions in the video encoding device, and does not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or one component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.

[0061] Additionally, some components may not be essential components that perform essential functions of the present invention, but may be optional components merely used to enhance performance. The present invention may be implemented by including only components essential to implementing the essence of the present invention, excluding components used solely for performance enhancement. A structure that includes only essential components, excluding optional components used solely for performance enhancement, is also within the scope of the present invention.

[0062] The picture splitting unit (110) can split the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture splitting unit (110) can split one picture into a combination of multiple coding units, prediction units, and transform units, and select one combination of coding units, prediction units, and transform units based on a predetermined criterion (e.g., a cost function) to encode the picture.

[0063] For example, a picture can be split into multiple coding units. A recursive tree structure, such as a quad tree structure, can be used to split a coding unit in a picture. A coding unit that is split into other coding units starting from an image or the largest coding unit as the root can be split into as many child nodes as the number of split coding units. A coding unit that cannot be split any further according to a certain restriction becomes a leaf node. That is, assuming that only a square split is possible for a coding unit, a coding unit can be split into at most four different coding units.

[0064] Hereinafter, in the embodiments of the present invention, the encoding unit may be used to mean a unit that performs encoding or may be used to mean a unit that performs decoding.

[0065] A prediction unit may be divided into at least one square or rectangular shape of the same size within a single coding unit, or may be divided such that one prediction unit among the divided prediction units within a single coding unit has a different shape and / or size from another prediction unit.

[0066] When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing it into multiple prediction units NxN.

[0067] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction and an intra prediction unit (125) that performs intra prediction. It may be determined whether to use inter prediction or intra prediction for a prediction unit, and specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. At this time, the processing unit where prediction is performed and the processing unit where the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode may be determined in the prediction unit, and the prediction may be performed in the transformation unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoder. When using a specific encoding mode, it is also possible to encode the original block as is and transmit it to the decoding unit without generating a prediction block through the prediction unit (120, 125).

[0068] The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous or subsequent pictures of the current picture, and in some cases, may predict a prediction unit based on information of a portion of an encoded region within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

[0069] The reference picture interpolation unit can receive reference picture information from the memory (155) and generate pixel information less than an integer pixel from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1 / 4 pixels. In the case of a chrominance signal, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1 / 8 pixels.

[0070] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods can be used to derive a motion vector, such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm). The motion vector can have a motion vector value in units of 1 / 2 or 1 / 4 pixels based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various methods can be used as motion prediction methods, such as the Skip method, the Merge method, the AMVP (Advanced Motion Vector Prediction) method, and the Intra Block Copy method.

[0071] The intra prediction unit (125) can generate a prediction unit based on reference pixel information surrounding the current block, which is pixel information within the current picture. If the neighboring block of the current prediction unit is a block on which inter prediction has been performed and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed can be replaced and used with reference pixel information of a surrounding block on which intra prediction has been performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced and used with at least one reference pixel among the available reference pixels.

[0072] In intra prediction, the prediction mode can have a directional prediction mode that uses reference pixel information according to the prediction direction, and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information can be different, and the intra prediction mode information used to predict luminance information or the predicted luminance signal information can be utilized to predict chrominance information.

[0073] When performing intra prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit can be performed based on the pixels located on the left side of the prediction unit, the pixels located on the upper left side, and the pixels located on the upper side. However, when performing intra prediction, if the sizes of the prediction unit and the transformation unit are different, intra prediction can be performed using reference pixels based on the transformation unit. In addition, intra prediction using N x N division can be used only for the minimum coding unit.

[0074] The intra prediction method can generate a prediction block after applying an Adaptive Intra Smoothing (AIS) filter to a reference pixel according to a prediction mode. The type of AIS filter applied to the reference pixel may be different. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction modes of prediction units existing around the current prediction unit. When the prediction mode of the current prediction unit is predicted using the mode information predicted from the surrounding prediction units, if the intra prediction modes of the current prediction unit and the surrounding prediction units are the same, information indicating that the prediction modes of the current prediction unit and the surrounding prediction units are the same can be transmitted using predetermined flag information, and if the prediction modes of the current prediction unit and the surrounding prediction units are different, entropy encoding can be performed to encode the prediction mode information of the current block.

[0075] Additionally, a residual block containing residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit, can be generated. The generated residual block can be input to the transformation unit (130).

[0076] In the transformation unit (130), the residual block including the residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.

[0077] The quantization unit (135) can quantize values ​​converted to the frequency domain by the transformation unit (130). The quantization coefficients can vary depending on the block or the importance of the image. The values ​​produced by the quantization unit (135) can be provided to the dequantization unit (140) and the reordering unit (160).

[0078] The rearrangement unit (160) can perform rearrangement of coefficient values ​​for quantized residual values.

[0079] The rearrangement unit (160) can change a two-dimensional block-shaped coefficient into a one-dimensional vector form through a coefficient scanning method. For example, the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector form by scanning from the DC coefficient to the coefficient of the high-frequency region using a zig-zag scan method. Depending on the size of the transformation unit and the intra prediction mode, a vertical scan that scans the two-dimensional block-shaped coefficient in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficient in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan, and the horizontal scan is to be used.

[0080] The entropy encoding unit (165) can perform entropy encoding based on the values ​​produced by the rearrangement unit (160). Entropy encoding can use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).

[0081] The entropy encoding unit (165) can encode various information such as residual value coefficient information of the encoding unit, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information from the rearrangement unit (160) and the prediction unit (120, 125).

[0082] The entropy encoding unit (165) can entropy encode the coefficient values ​​of the encoding unit input from the rearrangement unit (160).

[0083] The inverse quantization unit (140) and the inverse transformation unit (145) inversely quantize the values ​​quantized in the quantization unit (135) and inversely transform the values ​​transformed in the transformation unit (130). The residual values ​​generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.

[0084] The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).

[0085] A deblocking filter can remove block distortion caused by boundaries between blocks in a reconstructed picture. Whether to apply a deblocking filter to the current block can be determined based on the pixels contained in several columns or rows of the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. Furthermore, when applying a deblocking filter, horizontal and vertical filtering can be processed in parallel when performing vertical and horizontal filtering.

[0086] The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for an image that has undergone deblocking. To perform offset correction for a specific picture, the pixels contained in the image can be divided into a certain number of regions, the regions to be offset can be determined, and the offset can be applied to those regions. Alternatively, the offset can be applied by considering the edge information of each pixel.

[0087] Adaptive Loop Filtering (ALF) can be performed based on the comparison of the filtered restored image with the original image. After dividing the pixels included in the image into predetermined groups, a filter to be applied to each group can be determined, and filtering can be performed differentially for each group. Information regarding whether to apply ALF can be transmitted by luminance signal for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied can vary depending on each block. In addition, the same type (fixed type) of ALF filter can be applied regardless of the characteristics of the target block.

[0088] The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter prediction.

[0089]

[0090] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.

[0091] Referring to FIG. 2, the image decoder (200) may include an entropy decoding unit (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).

[0092] When a video bitstream is input to a video encoder, the input bitstream can be decoded in the opposite procedure to that of the video encoder.

[0093] The entropy decoding unit (210) can perform entropy decoding in a procedure opposite to that of the entropy encoding unit of the video encoder. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied in response to the method performed in the video encoder.

[0094] The entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the encoder.

[0095] The reordering unit (215) can perform reordering based on the method in which the bitstream entropy-decoded by the entropy decoding unit (210) is reordered by the encoding unit. The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them back to coefficients in the form of a two-dimensional block. The reordering unit (215) can perform reordering by receiving information related to the coefficient scanning performed by the encoding unit and performing reverse scanning based on the scanning order performed by the corresponding encoding unit.

[0096] The inverse quantization unit (220) can perform inverse quantization based on the quantization parameters provided by the encoder and the coefficient values ​​of the rearranged block.

[0097] The inverse transform unit (225) can perform inverse transform, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, i.e., DCT, DST, and KLT, on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, a transform technique (e.g., DCT, DST, KLT) can be selectively performed according to a plurality of pieces of information, such as a prediction method, the size of the current block, and the prediction direction.

[0098] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation related information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).

[0099] As described above, when performing intra prediction in the same manner as the operation in the image encoder, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit is performed based on the pixels on the left side of the prediction unit, the pixels on the upper left side, and the pixels on the upper side. However, when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction can be performed using reference pixels based on the transformation unit. In addition, intra prediction using N x N division only for the minimum coding unit can be used.

[0100] The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit may receive various information such as prediction unit information input from the entropy decoding unit (210), prediction mode information of an intra prediction method, and motion prediction-related information of an inter prediction method, and may distinguish a prediction unit from a current encoding unit and determine whether the prediction unit performs inter prediction or intra prediction. The inter prediction unit (230) may perform inter prediction on the current prediction unit based on information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit, using information necessary for inter prediction of the current prediction unit provided from the image encoder. Alternatively, inter prediction may be performed based on information on a pre-restored portion of the current picture including the current prediction unit.

[0101] In order to perform inter prediction, it is possible to determine whether the motion prediction method of the prediction unit included in the encoding unit is Skip Mode, Merge Mode, AMVP Mode, or Intra Block Copy Mode based on the encoding unit.

[0102] The intra prediction unit (235) can generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the image encoder. The intra prediction unit (235) can include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixels of the current block, and can determine and apply whether to apply the filter according to the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixels of the current block using the prediction mode and AIS filter information of the prediction unit provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

[0103] The reference pixel interpolation unit can interpolate the reference pixel to generate a reference pixel of a pixel unit less than an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated from the reference pixel. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

[0104] The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.

[0105] Information about whether a deblocking filter has been applied to a corresponding block or picture can be received from the video encoder, and if a deblocking filter has been applied, information about whether a strong or weak filter has been applied. The deblocking filter of the video decoder can receive information related to the deblocking filter provided by the video encoder, and the video decoder can perform deblocking filtering on the corresponding block.

[0106] The offset correction unit can perform offset correction on the restored image based on the type of offset correction applied to the image during encoding and offset value information.

[0107] ALF can be applied to a coding unit based on information such as whether ALF is applied and ALF coefficient information provided from the encoder. This ALF information can be provided by being included in a specific parameter set.

[0108] The memory (245) can store a restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to an output unit.

[0109] As described above, in the following embodiments of the present invention, for convenience of explanation, the term coding unit is used as an encoding unit, but it may also be a unit that performs not only encoding but also decoding.

[0110]

[0111] FIGS. 3 to 6 illustrate a method of dividing one picture into one or more division units according to the present disclosure.

[0112] A single picture can be divided into pre-defined partition units in an encoding / decoding device. Here, the pre-defined partition units can include at least one of a sub-picture, a slice, a tile, or a brick.

[0113] Specifically, a picture may be divided into one or more tile rows or one or more tile columns. Here, a tile may refer to a group of blocks covering a predetermined rectangular area within the picture. Here, a block may refer to a coding tree block (largest coding block). The coding tree blocks belonging to a tile may be scanned based on a raster scan order.

[0114] A tile can be divided into one or more bricks. A brick can be composed of blocks in a row or column of tiles. That is, the division into bricks can be performed only in one direction, either vertically or horizontally. However, this is not limited to this, and a single tile can also be divided into multiple bricks based on one or more vertical lines and one or more horizontal lines. A brick is a sub-concept of a tile and can also be called a sub-tile.

[0115] A slice may contain one or more tiles. Alternatively, a slice may contain one or more bricks. Alternatively, a slice may be defined by one or more coding tree block rows (CTU rows) within a tile. Alternatively, a slice may be defined by one or more coding tree block columns (CTU columns) within a tile. That is, a tile may be configured as one slice, or a tile may be composed of multiple slices. When dividing a tile into multiple slices, the dividing may be restricted to be performed in the horizontal direction only. In this case, the vertical boundary of the slice may coincide with the vertical boundary of the tile, but the horizontal boundary of the slice may not be the horizontal boundary of the tile, but rather may coincide with the horizontal boundary of a coding tree block within the tile. Conversely, the dividing may be restricted to be performed in the vertical direction only.

[0116] The encoding / decoding device may define multiple partitioning modes for a slice. For example, the partitioning mode may include at least one of a raster-scan mode or a rectangular slice mode. In the raster-scan mode, one slice may include a series of tiles (or blocks, bricks) in raster scan order. In the rectangular slice mode, one slice may include a plurality of tiles forming a rectangular area, or one or more rows (or columns) of coding tree blocks within one tile forming a rectangular area.

[0117] Information about the segmentation mode of the above slice may be explicitly encoded in the encoding device and signaled to the decoding device, or may be implicitly determined in the encoding / decoding device. For example, a flag indicating whether a rectangular slice mode is used may be signaled. When the flag is a first value, a raster-scan mode may be used, and when the flag is a second value, a rectangular slice mode may be used. The flag may be signaled at the level of at least one of a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a picture header (PH).

[0118] As described above, a slice may be composed of a rectangular unit containing one or more blocks, bricks or tiles, and the position, size, etc. of the slice may be expressed in that unit.

[0119] A subpicture may include one or more slices. Here, a slice may cover a rectangular area within a picture. That is, the boundary of a subpicture always coincides with the boundary of a slice, and the vertical boundary of a subpicture may always coincide with the vertical boundary of a tile. All coding tree blocks (CTUs) belonging to a subpicture may belong to the same tile. All coding tree blocks belonging to a tile may belong to the same subpicture.

[0120] The present invention is described assuming, but not limited to, that a picture may be composed of one or more sub-pictures, a sub-picture may be composed of one or more slices, tiles, or bricks, a slice may be composed of one or more tiles or bricks, and a tile may be composed of one or more bricks. That is, as described above, one tile may be composed of one or more slices.

[0121] The above division unit may be composed of an integer number of blocks, but is not limited thereto and may be composed of a decimal number rather than an integer number. That is, when it is not composed of an integer number of blocks, at least one division unit may be composed of a sub-block. Fig. 3 illustrates an example of slice division according to a raster-scan mode. Referring to Fig. 3, it can be seen that it is composed of 18 x 12 blocks (respectively, columns and rows), 12 tiles, and 3 slices. Here, a slice can be viewed as an example of a group of blocks or tiles in a series according to a given scan (raster scan).

[0122] Figure 4 illustrates an example of slice division according to the rectangular slice mode. Referring to Figure 4, it can be seen that it consists of 18 x 12 blocks, 24 tiles, and 9 slices. Here, the 24 tiles can also be expressed as 6 tile columns and 4 tile rows.

[0123] Figure 5 illustrates an example in which a single picture is divided into multiple tiles and rectangular slices. Referring to Figure 5, a single picture may be composed of 11 bricks, 4 tiles (2 tile columns and 2 tile rows), and 4 slices.

[0124] Fig. 6 illustrates an example of dividing a picture into multiple sub-pictures. Referring to Fig. 6, a picture may be composed of 18 tiles. Here, 4x4 blocks on the left (i.e., 16 CTUs) may constitute one tile, and 2x4 blocks on the right (i.e., 8 CTUs) may constitute one tile. In addition, as in the tile on the left, one tile may be one sub-picture (or slice), and as in the tile on the right, one tile may be composed of two sub-pictures (or slices).

[0125] Table 1 shows examples of segmentation or composition information for subpictures according to the present disclosure, and encoding control information (e.g., information on whether to apply an in-loop filter to a boundary, etc.).

[0126]

[0127] In the above Table 1, subpics_present_flag indicates whether subpictures are supported, and when subpictures are supported (when 1), information on the number of subpictures (max_subpic_minus1) or width or height information (subpic_grid_col_width_minus1, subpic_grid_row_height_minus1) of subpictures may be generated. At this time, length information such as width and height may be expressed as is (e.g., in units of 1 pixel) or as multiples or exponents of a predetermined unit / constant (e.g., integers such as 2, 4, 8, 16, 32, 64, 128, or maximum coding unit, minimum coding unit, maximum transformation unit, minimum transformation unit, etc.).

[0128] Here, based on the width and height of the picture and the width and height (uniform length) of each subpicture, we can derive the number of subpictures in the picture in units of columns and rows (NumSubPicGridRows, NumSubPicGridCols). And we can derive the number of subpictures in the picture (NumSubPics).

[0129] While the above example assumes that each subpicture has equal width or height, it is also possible that at least one of the widths or heights of each subpicture is not equal. Therefore, a flag can be used to specify whether all subpictures constituting a picture have the same size.

[0130] If all subpictures do not have the same size according to the above flag, the position information and the size information of each subpicture can be encoded / decoded. On the other hand, if all subpictures have the same size according to the above flag, the size information can be encoded / decoded only for the first subpicture.

[0131] Information about how many subpictures exist in a picture in units of columns or rows can be generated, and width or height information for each subpicture can also be generated individually.

[0132] After dividing the subpictures into the above columns and rows, the indexes of each subpicture can be assigned. In the case of implicit indices, the indices can be assigned based on a predetermined scan order (such as raster scan) (e.g., indices 0, 1, 2, etc. are assigned from left to right of the first subpicture row), but index information (subpic_grid_idx) for each subpicture can also be explicitly created.

[0133] For subpictures, it is possible to determine whether to treat them as pictures (subpic_treated_as_pic_flag) during the decoding process, excluding in-loop filtering operations. This may be related to whether a subpicture can be considered as an independent picture (when the flag is set to 1) in processing such as the reference picture list for inter-screen prediction.

[0134] It is possible to determine whether all subpictures within a picture are set as pictures (a single flag applied commonly) or whether they are set as pictures individually (multiple flags applied individually). Here, individual multiple flags can be encoded / decoded on a subpicture basis only if there is no restriction that all subpictures are treated as pictures according to a single commonly applied flag.

[0135] And loop_fiter_across_subpic_enabled_flag[i] can determine whether to perform filtering across the boundary of the i-th subpicture. If it is 1, it is performed across, and if it is 0, it is not performed.

[0136] Here, the part regarding loop_fitler_across_subpic_enabled_flag can be applied identically / similarly not only to the above syntax element but also to examples of handling boundaries of various segmentation units described later.

[0137]

[0138] Areas located at the border of a picture cannot be referenced or filtered, etc., because there is no data outside the picture. In other words, areas located inside the picture can be referenced or filtered, etc.

[0139] Meanwhile, even within a picture, it can be divided into units such as sub-pictures, slices, tiles, and bricks, and for some of these division units, whether to refer to adjacent areas on both sides of the boundary of different division units, whether to apply filtering, etc. can be adaptively determined.

[0140] Here, the cross-reference between the regions on either side of the boundary can be determined either explicitly or implicitly.

[0141] Here, whether boundary filtering (e.g., in-loop filter or in-loop filter, de-blocking filter, SAO, ALF, etc.) is performed can be determined explicitly or implicitly by information.

[0142] For example, for some units (A), cross-referencing for encoding / decoding between partition units may be possible, and filtering may be performed on the boundaries of the partition units. For example, for some units (B), cross-referencing for encoding / decoding between partition units may be prohibited, and filtering may not be performed on the boundaries of the partition units. For example, for some units (C), cross-referencing for encoding / decoding between partition units may be prohibited, and filtering may be performed on the boundaries of the partition units. For example, for some units (D), cross-referencing for encoding / decoding between partition units may be possible, and whether or not filtering is performed on the boundaries of the partition units may be determined based on predetermined flag information. For example, for some units (E), whether or not cross-referencing for encoding / decoding between partition units may be possible based on predetermined flag information, and whether or not filtering is performed on the boundaries of the partition units may be determined based on predetermined flag information.

[0143] The segmentation units A to E may correspond to at least one of the aforementioned sub-pictures, slices, tiles, or bricks. For example, all of the segmentation units A to E may be sub-pictures, tiles, or slices. Alternatively, some of the segmentation units A to E may be sub-pictures, and the rest may be slices or tiles. Alternatively, some of the segmentation units A to E may be slices, and the rest may be tiles.

[0144]

[0145] FIG. 7 illustrates a method for performing filtering based on a predetermined flag according to the present disclosure.

[0146] Referring to Fig. 7, one picture can be divided into multiple division units (S700).

[0147] The above-described division unit may be at least one of the aforementioned sub-pictures, slices, tiles, or bricks. For example, a single picture may be divided into multiple sub-pictures. It goes without saying that a single picture may be further divided into multiple slices and / or tiles in addition to sub-pictures. Since the division units are the same as those described above, a detailed description thereof will be omitted here.

[0148] Referring to FIG. 7, it is possible to determine whether to perform filtering on the boundary of a segmentation unit based on a predetermined flag (S710).

[0149] For convenience of explanation, it is assumed that the segmentation unit in the present disclosure is a sub-picture. However, the present disclosure is not limited thereto, and the present disclosure can be applied to the boundaries of slices, tiles, or bricks in the same / similar manner. In addition, filtering in the present disclosure means in-loop filtering applied to a reconstructed picture, and the filter for in-loop filtering may include at least one of a deblocking filter (DF), a sample adaptive offset (SAO), or an adaptive loop filter (ALF).

[0150] The above division unit may be supported for purposes such as parallel processing, partial decoding, etc.

[0151] Therefore, after encoding / decoding of each partition unit is completed, it can be implicitly or explicitly decided whether to perform filtering on the boundaries between partition units or on the boundaries of partition units (e.g., an in-loop filter).

[0152] Specifically, a flag may be used to indicate whether filtering is to be performed on the boundary of a segmentation unit. Here, the flag may be implicitly determined in a higher-order unit including multiple segmentation units, or may be explicitly encoded / decoded. The higher-order unit may refer to a picture, or may refer to a unit composed of only a portion of the segmentation units constituting the picture. Alternatively, the flag may be implicitly determined for each segmentation unit, or may be explicitly encoded / decoded. Alternatively, the flag may be implicitly determined for each boundary of a segmentation unit, or may be explicitly encoded / decoded. This will be described in detail with reference to FIGS. 8 to 15.

[0153] Referring to FIG. 7, filtering can be performed on the boundary of the segmentation unit in response to the decision in S710 (S720).

[0154] Specifically, at least one of a deblocking filter, a sample adaptive offset, or an adaptive loop filter may be applied to the boundary of a segmentation unit. The aforementioned filters may be applied sequentially according to a predetermined priority. For example, after the deblocking filter is applied, a sample adaptive offset may be applied. After the sample adaptive offset is applied, an adaptive loop filter may be applied. A method of applying a deblocking filter to the boundary of a segmentation unit will be described in detail with reference to FIG. 16.

[0155]

[0156] FIGS. 8 to 15 illustrate a method for determining whether filtering is performed on the boundary of a segmentation unit based on one or more flags according to the present disclosure.

[0157] A flag that determines whether filtering is performed on the boundary of a segmentation unit may be supported for each type of segmentation unit. For example, at least one of a flag indicating whether filtering is performed on the boundary of a subpicture (loop_filter_across_subpic_enabled_flag, hereinafter referred to as the first flag), a flag indicating whether filtering is performed on the boundary of a slice (loop_filter_across_slices_enabled_flag, hereinafter referred to as the second flag), a flag indicating whether filtering is performed on the boundary of a tile (loop_filter_across_tiles_enabled_flag, hereinafter referred to as the third flag), or a flag indicating whether filtering is performed on the boundary of a brick (loop_filter_across_bricks_enabled_flag, hereinafter referred to as the fourth flag) may be supported.

[0158] Alternatively, the encoding / decoding device may support only some of the flags described above. For example, only {first flag, second flag, third flag}, {first flag, second flag, fourth flag}, {second flag, third flag, fourth flag}, {first flag, second flag}, {first flag, third flag}, {first flag, fourth flag}, {second flag, third flag}, {second flag, fourth flag}, {third flag, fourth flag}, {first flag}, {second flag}, {third flag}, or {fourth flag} may be supported.

[0159] Additionally, all of the above-mentioned first through fourth flags may be explicitly supported, or some of the first through fourth flags may be explicitly supported, while the rest may be implicitly supported. For example, one of the first through fourth flags may be explicitly supported, while the other may be implicitly determined based on the explicitly supported flags.

[0160] In the embodiments described below, for convenience of explanation, the first to fourth flags will be referred to as loop_filter_across_enabled_flag. Furthermore, it is assumed that the flag is supported when the corresponding partitioning unit is supported.

[0161] Figure 8 illustrates an example in which a flag (loop_filter_across_enabled_flag) is supported for a single picture including multiple segmentation units.

[0162] Referring to Table 2, if the flag (loop_filter_across_enabled_flag) is the first value, filtering is restricted from being performed on the boundary of a segmentation unit within a picture, and if the flag is the second value, the restriction is not imposed on the boundary of a segmentation unit. That is, when the flag is the second value, filtering may or may not be performed on the boundary of a segmentation unit within a picture.

[0163] In other words, if the flag is the first value, this may mean that the boundary of the segmentation unit is treated the same as the boundary of the picture, and if the flag is the second value, this may mean that there is no restriction that the boundary of the segmentation unit is treated the same as the boundary of the picture.

[0164]

[0165] In Fig. 8, A to F represent segmentation units, and the presence of arrows, as in the left drawing, indicates that filtering can be performed between the boundaries of the segmentation units, while the absence of arrows, as in the right drawing, indicates that filtering is restricted from being performed between the boundaries of the segmentation units. For convenience of explanation, it is assumed that each segmentation unit is rectangular.

[0166] The above embodiment means a case where it is determined whether to perform filtering on all segmentation units within a picture, regardless of the hierarchical relationship between the segmentation units.

[0167] Figure 9 illustrates an example in which the flag is individually supported in the upper unit of a division unit. That is, based on the flag of the upper unit, it can be determined whether filtering is performed on the boundary of a division unit existing within the upper unit.

[0168] Referring to Table 3, a flag (loop_filter_across_enabled_flag) can be encoded / decoded for each upper unit. loop_filter_across_enabled_flag[i] can indicate whether filtering is performed on the boundary of a partition unit within the i-th upper unit. For example, when the flag is the first value, filtering is restricted from being performed on the boundary of a partition unit within the upper unit, and when the flag is the second value, the restriction is not imposed on the boundary of a partition unit within the upper unit. That is, when the flag is the second value, filtering may or may not be performed on the boundary of a partition unit within the upper unit.

[0169] Alternatively, when the flag is the first value, filtering may not be performed on the boundary of a partition unit within the upper unit, and when the flag is the second value, filtering may be performed on the boundary of a partition unit within the upper unit. This may mean that filtering may be performed on the boundary of at least one of the partition units within the upper unit, or that filtering may be performed on the boundary of all partition units belonging to the upper unit.

[0170] In this embodiment, a picture may be composed of multiple upper units, and each upper unit may be composed of multiple partition units. For example, if the upper unit is a sub-picture, the partition unit may be a tile, a slice, or a brick. Alternatively, the upper unit may be defined as a group of sub-pictures having a size smaller than the picture, in which case the partition unit may be a sub-picture, a tile, a slice, or a brick.

[0171]

[0172] The above embodiment means that a flag is supported for determining whether to perform filtering on the boundary of a partition unit in a higher unit defined as a group of predetermined partition units.

[0173] Referring to FIG. 9, one picture may be composed of two upper units (i.e., a first upper unit composed of A to C, and a second upper unit composed of D to F).

[0174] In the first upper unit, the flag for whether filtering is performed is 0, and in the second upper unit, the flag for whether filtering is performed is 1. The boundary between the division units belonging to the first upper unit and the second upper unit may or may not be filtered depending on the flag for determining whether filtering is performed in the upper unit.

[0175] Figure 10 illustrates a case where a flag (loop_filter_across_enabled_flag) is supported for each segmentation unit that constitutes one picture.

[0176] Unlike the embodiment of FIG. 9, this embodiment determines whether filtering is performed on the boundary of each segmentation unit. Therefore, even if the syntax elements are identical to those in Table 2, their meanings may differ.

[0177] Referring to Table 4, a flag (loop_filter_across_enabled_flag) can be encoded / decoded for each segmentation unit. loop_filter_across_enabled_flag[i] can indicate whether filtering is performed on the boundary of the i-th segmentation unit in the picture.

[0178] For example, if the flag is the first value, filtering is restricted from being performed on the boundary of the i-th segmentation unit within the picture, and if the flag is the second value, filtering may be performed on the boundary of the i-th segmentation unit within the picture. That is, if the flag is the second value, filtering may or may not be performed on the boundary of the segmentation unit within the picture.

[0179] Meanwhile, the flag (loop_filter_across_enabled_flag[i]) for each segmentation unit can be selectively encoded / decoded based on the flag (loop_filter_across_enabled_flag) for a single picture. The flag for a single picture is as described in the embodiment of Fig. 8, and a detailed description thereof will be omitted.

[0180] For example, if filtering is restricted to the boundaries of segmentation units within a picture based on a flag for a single picture, the flag for each segmentation unit is not encoded / decoded. If, based on a flag for a single picture, the boundary of a segmentation unit is not subject to the above restrictions, the flag for each segmentation unit can be encoded / decoded.

[0181] Meanwhile, the flag for a picture and the flag for each segmentation unit can be encoded / decoded at the same level. Here, the same level can be any one of a video parameter set, a sequence parameter set, or a picture parameter set.

[0182]

[0183] Referring to Fig. 10, based on the flag for each division unit, filtering can be performed on the boundary of the division unit as in the left drawing, and filtering can be not performed on the boundary of the division unit as in the right drawing.

[0184] Figure 11 illustrates a method for determining whether to perform filtering based on the boundary position of a segmentation unit.

[0185] This embodiment is related to the embodiment of FIG. 9 or the embodiment of FIG. 10 described above. If it is determined that filtering is to be performed on the boundary of each segmentation unit, predetermined direction information to which filtering is applied can be encoded / decoded.

[0186] Referring to Table 5, information regarding whether filtering is performed on at least one boundary in the left, right, up, or down directions may be encoded / decoded. If a boundary in a specific direction among the boundaries of a segmentation unit coincides with a boundary of a picture, encoding / decoding information regarding that direction may be omitted.

[0187] This embodiment is a case where a flag is used to determine whether filtering is to be performed on a boundary in a specific direction, and a flag may also be used to determine whether filtering is to be performed in a bundle unit of some directions (e.g., left+right, up+down, left+right+up, etc.).

[0188]

[0189] Referring to Fig. 11, the left drawing illustrates a case where filtering is performed on the boundary in all directions of the division unit (X). The center drawing illustrates a case where filtering is performed only on the boundary in the left and right directions of the division unit (X), and the right drawing illustrates a case where filtering is not performed on the boundary of the division unit (X).

[0190] Figures 12 and 13 illustrate a method for determining whether to perform filtering on the boundary of a current partition unit based on a flag for a neighboring partition unit.

[0191] This embodiment may be related to the embodiment of FIG. 10 described above. That is, whether to perform filtering on the boundary of the current partition unit may be determined by considering flags for neighboring partition units in addition to flags for the current partition unit. If the boundary of the current partition unit is a vertical boundary, the neighboring partition unit may refer to a partition unit adjacent to the left or right of the current partition unit. If the boundary of the current partition unit is a horizontal boundary, the neighboring partition unit may refer to a partition unit adjacent to the top or bottom of the current partition unit.

[0192] Referring to Fig. 12, it is assumed that filtering is performed on the boundary of the partitioning units X and Y. Since the boundary where X and Y meet is determined to be filtered, filtering can be performed on the right boundary of the partitioning unit X (i.e., the left boundary of the partitioning unit Y).

[0193] Referring to Fig. 13, this is a case where it is determined that filtering is not performed for only one of the partition units X and Y. That is, since the flag (loop_filter_across_enabled_flag) for the partition unit X is 1, filtering can be performed for the boundary of the partition unit X. On the other hand, since the flag (loop_filter_across_enabled_flag) for the partition unit Y is 0, filtering is not performed for the boundary of the partition unit Y.

[0194] One of the reasons for performing filtering between partitions is to reduce degradation between each partition that occurs due to individual encoding / decoding between each partition.

[0195] Therefore, as in the above embodiment, it may be possible to perform filtering on the boundary of one adjacent partition area and not perform filtering on the boundary of the other partition area.

[0196] Alternatively, if applying filtering only to the boundaries of one of the segmented regions may not be effective in removing image quality degradation, it may be decided not to perform filtering on those boundaries.

[0197] For example, if the values ​​of the flag for partitioning unit X and the flag for partitioning unit Y are different, filtering may be performed on the boundary between partitioning units X and Y, or it may be determined that filtering is allowed.

[0198] For example, assume that the left boundary of the current block coincides with the left boundary of the current partitioning unit to which the current block belongs. In this case, even if the flag for the current partitioning unit is 0, if the flag for the left partitioning unit adjacent to the current partitioning unit is 1, filtering can be performed on the left boundary of the current block.

[0199] Similarly, assume that the upper boundary of the current block coincides with the upper boundary of the current partition unit to which the current block belongs. In this case, filtering can be performed on the upper boundary of the current block even if the flag for the current partition unit is 0, as long as the flag for the upper partition unit adjacent to the current partition unit is 1.

[0200] Alternatively, if the values ​​of the flag for partitioning unit X and the flag for partitioning unit Y are different, it may be determined that no filtering is performed on the boundary between partitioning units X and Y, or that filtering is not allowed.

[0201] For example, assume that the left boundary of the current block matches the left boundary of the current partitioning unit to which the current block belongs. In this case, even if the flag for the current partitioning unit is 1, filtering may not be performed on the left boundary of the current block if the flag for the left partitioning unit adjacent to the current partitioning unit is 0.

[0202] Similarly, assume that the upper boundary of the current block coincides with the upper boundary of the current partition unit to which the current block belongs. In this case, even if the flag for the current partition unit is 1, if the flag for the upper partition unit adjacent to the current partition unit is 0, filtering may not be performed on the upper boundary of the current block.

[0203] Figure 14 shows a case where information indicating whether filtering is performed is generated for each division unit boundary.

[0204] Referring to Figure 14, it is possible to control whether filtering is performed at each partition boundary that divides or partitions partition units A to F. If filtering is performed at the C0 boundary, filtering may be performed at the A and B boundaries, and the D and E boundaries, and if not, filtering may not be performed at the above boundaries.

[0205] The number or index of C0, C1, R0, etc. can be derived from the partition information or section information of the partition unit. Alternatively, information on the partition unit boundary and information for explicitly assigning the index can be generated. As in the syntax elements of Table 6 below, based on Num_units_rows and Num_unit_cols, information for determining whether to perform filtering at each partition unit boundary (in this example, each column and row) can be generated.

[0206]

[0207] Figure 15 shows another example in which information indicating whether filtering is performed at each segmentation unit boundary is generated.

[0208] Referring to FIG. 15, it is possible to control whether filtering is performed for each segmentation boundary that divides or partitions segmentation units A to F. The difference from the embodiment of FIG. 14 is that related information is generated for each segmentation unit boundary, rather than for a single column or row crossing the picture.

[0209] If filtering is performed on the L0 boundary, filtering can be performed on the A and B boundaries, and if not, filtering may not be performed on the above boundaries.

[0210] The number or index of C0, C1, R0, etc. can be derived from the partition information or section information of the partition unit. Alternatively, information on the partition unit boundary and information explicitly assigning the index can be generated. As in the syntax element of Table 7, information for determining whether to perform filtering at each partition unit boundary can be generated based on Num_unit_boundary.

[0211]

[0212] Figure 16 illustrates a method of applying a deblocking filter according to the present disclosure.

[0213] Referring to FIG. 16, a block boundary (hereinafter referred to as an edge) for deblocking filtering among the block boundaries of a restored picture can be specified (S1600).

[0214] The restored picture can be partitioned into a predetermined NxM pixel grid (sample grid). The NxM pixel grid can mean a unit on which deblocking filtering is performed. Here, N and M can be integers of 4, 8, 16, or more. The pixel grid can be defined for each component type. For example, when the component type is a luminance component, N and M can be set to 4, and when the component type is a chrominance component, N and M can be set to 8. Regardless of the component type, a fixed-size NxM pixel grid can also be used.

[0215] The above edge is a block boundary located on an NxM pixel grid, and may include at least one of a boundary of a transform block, a boundary of a prediction block, or a boundary of a sub-block.

[0216] Referring to Fig. 16, a decision value for the specified edge can be derived (S1610).

[0217] In this embodiment, it is assumed that the edge type is a vertical edge and a 4x4 pixel grid is applied. Based on the edge, the left and right blocks are called P blocks and Q blocks, respectively. The P blocks and Q blocks are pre-restored blocks, the Q block refers to the area where deblocking filtering is currently performed, and the P block may refer to a block spatially adjacent to the Q block.

[0218] First, the decision value can be derived using the variable dSam for deriving the decision value. The variable dSam can be derived for at least one of the first pixel line (row) or the fourth pixel line (row) of the P block and the Q block. Hereinafter, dSam for the first pixel line (row) of the P block and the Q block is referred to as dSam0, and dSam for the fourth pixel line (row) is referred to as dSam3.

[0219] If at least one of the following conditions is satisfied, dSam0 is set to 1, otherwise, dSam0 may be set to 0.

[0220] Condition 1 dqp < first threshold 2 (sp + sq) < second threshold 3 spq < third threshold

[0221] In Table 8, dpq can be derived based on at least one of the first pixel value linearity (d1) of the first pixel line of the P block or the second pixel value linearity (d2) of the first pixel line of the Q block. Here, the first pixel value linearity (d1) can be derived using i pixels p belonging to the first pixel line of the P block. i can be 3, 4, 5, 6, 7, or more. The i pixels p can be consecutive pixels that are adjacent to each other, or can be non-consecutive pixels spaced apart at a certain interval. In this case, the pixel p can be the i pixels closest to the edge among the pixels of the first pixel line. Similarly, the second pixel value linearity (d2) can be derived using j pixels q belonging to the first pixel line of the Q block. j can be 3, 4, 5, 6, 7, or more. j is set to the same value as i, but is not limited thereto, and can be a different value from i. The j pixels q may be consecutive pixels adjacent to each other or non-consecutive pixels spaced apart at a certain interval. In this case, the pixel q may be the j pixels closest to the edge among the pixels of the first pixel line.

[0222] For example, when three pixels p and three pixels q are used, the first pixel value linearity (d1) and the second pixel value linearity (d2) can be derived as in the following mathematical expression 1.

[0223] [Mathematical Formula 1]

[0224] d1 = Abs( p2,0 - 2 * p1,0 + p0,0 )

[0225] d2 = Abs( q2,0 - 2 * q1,0 + q0,0 )

[0226] Alternatively, when six pixels p and six pixels q are used, the first pixel value linearity (d1) and the second pixel value linearity (d2) can be derived as in the following mathematical expression 2.

[0227] [Equation 2]

[0228] d1 = ( Abs( p2,0 - 2 * p1,0 + p0,0 ) + Abs( p5,0 - 2 * p4,0 + p3,0 ) + 1 ) >> 1

[0229] d2 = ( Abs( q2,0 - 2 * q1,0 + q0,0 ) + Abs( q5,0 - 2 * q4,0 + q3,0 ) + 1 ) >> 1

[0230] In Table 8, sp may represent the first pixel value change (v1) of the first pixel line of the P block, and sq may represent the second pixel value change (v2) of the first pixel line of the Q block. Here, the first pixel value change (v1) may be derived using m pixels p belonging to the first pixel line of the P block. m may be 2, 3, 4, 5, 6, 7, or more. The m pixels p may be consecutive pixels that are adjacent to each other, or may be non-consecutive pixels spaced apart at a regular interval. Alternatively, some of the m pixels p may be consecutive pixels that are adjacent to each other, and the rest may be non-consecutive pixels spaced apart at a regular interval. Similarly, the second pixel value change (v2) may be derived using n pixels q belonging to the first pixel line of the Q block. n may be 2, 3, 4, 5, 6, 7, or more. n is set to the same value as m, but is not limited thereto, and may have a different value from m. The n pixels q may be contiguous pixels that are adjacent to each other, or may be non-contiguous pixels spaced apart at regular intervals. Alternatively, some of the n pixels q may be contiguous pixels that are adjacent to each other, and the rest may be non-contiguous pixels spaced apart at regular intervals.

[0231] For example, when two pixels p and two pixels q are used, the first pixel value change (v1) and the second pixel value change (v2) can be derived as in the following mathematical expression 3.

[0232] [Equation 3]

[0233] v1 = Abs( p3,0 - p0,0 )

[0234] v2 = Abs( q0,0 - q3,0 )

[0235] Alternatively, when six pixels p and six pixels q are used, the first pixel value change (v1) and the second pixel value change (v2) can be derived as in the following mathematical expression 4.

[0236] [Equation 4]

[0237] v1 = Abs( p3,0 - p0,0 ) + Abs( p7,0 - p6,0 - p5,0 + p4,0)

[0238] v2 = Abs( q0,0 - q3,0 ) + Abs( q4,0 - q5,0 - q6,0 + q7,0 )

[0239] spq in Table 8 can be derived as the difference between pixels p0,0 and q0,0 adjacent to the edge.

[0240] The first and second thresholds of Table 8 can be derived based on a predetermined parameter (QP). Here, the QP can be determined using at least one of a first quantization parameter of a P block, a second quantization parameter of a Q block, or an offset for deriving the QP. The offset can be a value that is encoded and signaled in an encoding device. For example, the QP can be derived by adding the offset to an average value of the first and second quantization parameters. The third threshold of Table 8 can be derived based on the aforementioned quantization parameter (QP) and block boundary strength (BS). Here, the BS can be variably determined by considering the prediction mode of the P / Q block, the inter prediction mode, the presence or absence of a non-zero transform coefficient, the difference in motion vectors, etc.

[0241] For example, if at least one prediction mode of the P block and the Q block is intra mode, BS may be set to 2. If at least one of the P block or the Q block is encoded in a joint prediction mode, BS may be set to 2. If at least one of the P block or the Q block includes a non-zero transform coefficient, BS may be set to 1. If the P block is encoded in a different inter prediction mode from the Q block (e.g., the P block is encoded in the current picture reference mode and the Q block is encoded in the merge mode or the AMVP mode), BS may be set to 1. If both the P block and the Q block are encoded in the current picture reference mode and the difference between their block vectors is greater than or equal to a predetermined threshold difference, BS may be set to 1. Here, the threshold difference may be a fixed value (e.g., 4, 8, 16) pre-agreed to the encoding / decoding device.

[0242] dSam3 is derived using one or more pixels belonging to the fourth pixel line in the same manner as dSam0 described above, and a detailed description thereof will be omitted.

[0243] Based on the above-described dSam0 and dSam3, a decision value can be derived. For example, if both dSam0 and dSam3 are 1, the decision value can be set to a first value (e.g., 3), and otherwise, the decision value can be set to a second value (e.g., 1 or 2).

[0244] Referring to Fig. 16, the filter type of the deblocking filter can be determined based on the derived decision value (S1620).

[0245] In an encoding / decoding device, multiple filter types with different filter lengths may be defined. Examples of filter types may include a long filter having the longest filter length, a short filter having the shortest filter length, or one or more middle filters having a length longer than the short filter and shorter than the long filter. The number of filter types defined in an encoding / decoding device may be two, three, four, or more.

[0246] For example, when the decision value is the first value, a long filter may be used, and when the decision value is the second value, a short filter may be used. Alternatively, when the decision value is the first value, either a long filter or an intermediate filter may be selectively used, and when the decision value is the second value, a short filter may be used. Alternatively, when the decision value is the first value, a long filter may be used, and when the decision value is not the first value, either a short filter or an intermediate filter may be selectively used. In particular, when the decision value is 2, a intermediate filter may be used, and when the decision value is 1, a short filter may be used.

[0247] Referring to FIG. 16, filtering can be performed on the edge of the restored picture based on the deblocking filter according to the determined filter type (S1630).

[0248] A deblocking filter can be applied to multiple pixels located in both directions based on an edge and located in the same pixel line. Here, the multiple pixels to which the deblocking filter is applied are called a filtering region, and the length (or number of pixels) of the filtering region may differ depending on the filter type. The length of the filtering region may be interpreted as having the same meaning as the filter length of the above-described filter type. Alternatively, the length of the filtering region may mean the sum of the number of pixels to which the deblocking filter is applied within the P block and the number of pixels to which the deblocking filter is applied within the Q block.

[0249] In this embodiment, we assume that three filter types, namely a long filter, an intermediate filter, and a short filter, are defined in the encoding / decoding device, and examine the deblocking filtering method for each filter type. However, this is not limited to this, and only the long filter and the intermediate filter, or only the long filter and the short filter, or only the intermediate filter and the short filter may be defined.

[0250] 1. For deblocking filtering based on long filter

[0251] For convenience of explanation, unless otherwise stated, it is assumed that the edge type is a vertical edge and that the pixel currently being filtered (hereinafter, current pixel q) belongs to block Q. The filtered pixel fq can be derived through a weighted average of the first reference value and the second reference value.

[0252] Here, the first reference value can be derived using all or part of the pixels of the filtering region to which the current pixel q belongs. Here, the length (or number of pixels) of the filtering region can be an integer of 8, 10, 12, 14, or a larger number. Some pixels of the filtering region can belong to the P block, and the remaining pixels can belong to the Q block. For example, when the length of the filtering region is 10, 5 pixels can belong to the P block, and 5 pixels can belong to the Q block, respectively. Alternatively, 3 pixels can belong to the P block, and 7 pixels can belong to the Q block, respectively. Conversely, 7 pixels can belong to the P block, and 3 pixels can belong to the Q block, respectively. In other words, long filter-based deblocking filtering can be performed symmetrically or asymmetrically on the P block and the Q block.

[0253] Regardless of the current position of pixel q, all pixels belonging to the same filtering area can share the same first reference value. That is, the same first reference value can be used regardless of whether the pixel currently being filtered is located in the P block or the Q block. The same first reference value can be used regardless of the position of the pixel currently being filtered within the P block or the Q block.

[0254] The second reference value may be derived using at least one of the pixels of the filtering area belonging to the Q block that is farthest from the edge (hereinafter, referred to as the first pixel) or the surrounding pixels of the filtering area. The surrounding pixel may refer to at least one pixel neighboring in the right direction of the filtering area. For example, the second reference value may be derived as an average value between one first pixel and one surrounding pixel. Alternatively, the second reference value may be derived as an average value between two or more first pixels and two or more surrounding pixels neighboring in the right direction of the filtering area.

[0255] For weighted averaging, predetermined weights f1 and f2 may be applied to the first reference value and the second reference value, respectively. Specifically, the encoding / decoding device may define a plurality of weight sets and selectively use any one of the plurality of weight sets to set the weight f1. The selection may be performed in consideration of the length (or number of pixels) of the filtering region belonging to the Q block. For example, the encoding / decoding device may define weight sets as shown in Table 9 below. Each weight set may be composed of one or more weights corresponding to each position of a pixel to be filtered. Accordingly, among the plurality of weights belonging to the selected weight set, a weight corresponding to the position of the current pixel q may be selected and applied to the current pixel q. The number of weights constituting the weight set may be equal to the length of the filtering region belonging to the Q block. The plurality of weights constituting one weight set may be sampled at regular intervals within a range of integers greater than 0 and less than 64. Here, 64 is merely an example, and may be greater than or less than 64. The above-mentioned interval may be 9, 13, 17, 21, 25 or more. The above-mentioned interval may be variably determined depending on the length (L) of the filtering region belonging to the Q block. Alternatively, a fixed interval may be used regardless of L.

[0256] Length of filtering region belonging to block Q (L) Weight set L > 5 { 59, 50, 41, 32, 23, 14, 5} 5 { 58, 45, 32, 19, 6} L < 5 { 53, 32, 11}

[0257] Referring to Table 9, when the length (L) of the filtering region belonging to the Q block is greater than 5, {59, 50, 41, 32, 23, 14, 5} among the three weight sets may be selected, when L is 5, {58, 45, 32, 19, 6} may be selected, and when L is less than 5, {53, 32, 11} may be selected. However, Table 9 is only an example of a weight set, and the number of weight sets defined in the encoding / decoding device may be 2, 4, or more.

[0258] Also, if L is 7 and the current pixel is the first pixel (q0) from the edge, a weight of 59 can be applied to the current pixel. If the current pixel is the second pixel (q1) from the edge, a weight of 50 can be applied to the current pixel, and if the current pixel is the seventh pixel (q6) from the edge, a weight of 5 can be applied to the current pixel.

[0259] The weight f2 may be determined based on the pre-determined weight f1. For example, the weight f2 may be determined by subtracting the weight f1 from a pre-defined constant. Here, the pre-defined constant is a fixed value pre-defined for the encoding / decoding device, such as 64. However, this is merely an example, and integers greater than or less than 64 may also be used.

[0260] 2. For deblocking filtering based on intermediate filters

[0261] The filter length of the intermediate filter may be smaller than the filter length of the long filter. The length (or number of pixels) of the filtering area according to the intermediate filter may be smaller than the length of the filtering area according to the aforementioned long filter.

[0262] For example, the length of the filtering region according to the intermediate filter may be 6, 8, or more. Here, the length of the filtering region belonging to the P block may be the same as the length of the filtering region belonging to the Q block. However, this is not limited thereto, and the length of the filtering region belonging to the P block may be longer or shorter than the length of the filtering region belonging to the Q block.

[0263] Specifically, the filtered pixel fq can be derived using the current pixel q and at least one neighboring pixel adjacent to the current pixel q. Here, the neighboring pixel can include at least one of one or more pixels neighboring to the left of the current pixel q (hereinafter, referred to as left neighboring pixels) or one or more pixels neighboring to the right of the current pixel q (hereinafter, referred to as right neighboring pixels).

[0264] For example, if the current pixel q is q0, two left-side neighboring pixels (p0, p1) and two right-side neighboring pixels (q1, q2) can be used. If the current pixel q is q1, two left-side neighboring pixels (p0, q0) and one right-side neighboring pixel (q2) can be used. If the current pixel q is q2, three left-side neighboring pixels (p0, q0, q1) and one right-side neighboring pixel (q3) can be used.

[0265] 3. For deblocking filtering based on short filters

[0266] The filter length of the short filter may be shorter than that of the intermediate filter. The length (or number of pixels) of the filtering area according to the short filter may be shorter than that of the filtering area according to the intermediate filter described above. For example, the length of the filtering area according to the short filter may be 2, 4, or more.

[0267] Specifically, the filtered pixel fq can be derived by adding or subtracting a predetermined first offset (offset1) to the current pixel q. Here, the first offset can be determined based on the difference between the pixels of the P block and the pixels of the Q block. For example, as in the following mathematical expression 5, the first offset can be determined based on the difference between the pixels p0 and q0 and the difference between the pixels p1 and q1. However, filtering for the current pixel q can be performed only when the first offset is smaller than a predetermined threshold. Here, the threshold is derived based on the aforementioned quantization parameter (QP) and block boundary strength (BS), and a detailed description thereof will be omitted.

[0268] [Equation 5]

[0269] offset1 = ( 9 * ( q0 - p0 ) - 3 * ( q1 - p1 ) + 8 ) >> 4

[0270] Alternatively, the filtered pixel fq may be derived by adding a second offset (offset2) to the current pixel q. Here, the second offset may be determined by considering at least one of the difference (or change) between the current pixel q and the surrounding pixels or the first offset. Here, the surrounding pixels may include at least one of the left pixel or the right pixel of the current pixel q. For example, the second offset may be determined as in the following mathematical expression 6.

[0271] [Equation 6]

[0272] offset2 = ((( q2 + q0 + 1 ) >> 1 ) - q1 - offset1 ) >> 1

[0273] The filtering method described above is not limited to being applied only to deblocking filters, and can be applied in the same / similar manner to adaptive sample offset (SAO) and adaptive loop filter (ALF), which are examples of in-loop filters.

[0274]

[0275] While the exemplary methods of this disclosure are presented as a series of operations for clarity of description, this is not intended to limit the order in which the steps are performed, and individual steps may be performed simultaneously or in different orders, if desired. To implement a method according to this disclosure, additional steps may be included in addition to the steps illustrated, some steps may be excluded and the remaining steps included, or some steps may be excluded and additional steps included.

[0276] The various embodiments of the present disclosure are not intended to list all possible combinations but rather to illustrate representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.

[0277] Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the embodiments may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.

[0278] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium having such software or instructions stored thereon and executable on the device or computer.

[0279] The present invention can be used to encode / decode a video signal.

Claims

1. A step of dividing one picture into multiple segmentation units; a step of determining whether to perform filtering on the boundary of the current segmentation unit based on a predetermined flag; and In response to the above decision, comprising a step of performing filtering on the boundary of the current division unit, The above division unit includes at least one of a subpicture, a slice, or a tile, A method for decoding an image, wherein the flag includes at least one of a first flag indicating whether filtering is performed on a boundary of a segmentation unit belonging to the one picture or a second flag indicating whether filtering is performed on a boundary of a current segmentation unit within the one picture.

2. In paragraph 1, If the first flag is the first value, filtering is restricted from being performed on the boundary of a segmentation unit within the one picture, and if the first flag is the second value, the restriction is not imposed on the boundary of a segmentation unit within the one picture. An image decoding method, wherein when the second flag is the first value, filtering is restricted from being performed on the boundary of the current segmentation unit, and when the second flag is the second value, filtering can be performed on the boundary of the current segmentation unit.

3. In paragraph 2, A method for decoding an image, wherein the second flag is decoded only when filtering is not restricted from being performed on the boundary of a segmentation unit within the one picture according to the first flag.

4. In paragraph 1, A method for decoding an image, wherein whether to perform filtering on the boundary of the current segmentation unit is determined by further considering a third flag regarding whether filtering is performed on the boundary of a neighboring segmentation unit adjacent to the current block unit.

5. In paragraph 4, An image decoding method, wherein the location of the neighboring segmentation unit is determined based on whether the boundary of the current segmentation unit is a vertical boundary or a horizontal boundary.

6. In the first paragraph, the step of performing the filtering comprises: A step for specifying block boundaries for deblocking filtering; A step of deriving a decision value for the above block boundary; A step of determining a filter type for the deblocking filtering based on the above decision value; and An image decoding method, comprising the step of performing filtering on the block boundary based on the filter type.

7. A step of dividing one picture into multiple segmentation units; a step of determining whether to perform filtering on the boundary of the current segmentation unit; and In response to the above decision, comprising a step of performing filtering on the boundary of the current division unit, The above division unit includes at least one of a subpicture, a slice, or a tile, The step of determining whether to perform filtering on the boundary of the current segmentation unit is: A method for encoding an image, comprising the step of encoding at least one of a first flag indicating whether filtering is performed on a boundary of a segmentation unit belonging to the one picture or a second flag indicating whether filtering is performed on a boundary of a current segmentation unit within the one picture.

8. In paragraph 7, If it is determined that filtering is not restricted to be performed on the boundary of a segmentation unit within the above one picture, the first flag is encoded with a first value, and if it is determined that the restriction is not imposed on the boundary of a segmentation unit within the above one picture, the first flag is encoded with a second value. A video encoding method, wherein if it is determined that filtering is not to be performed on the boundary of the current segmentation unit, the second flag is encoded with a first value, and if it is determined that filtering can be performed on the boundary of the current segmentation unit, the second flag is encoded with a second value.

9. In paragraph 8, A method of encoding an image, wherein the second flag is encoded only when filtering is not restricted from being performed on the boundary of a segmentation unit within the one picture.

10. In paragraph 7, A video encoding method, wherein whether to perform filtering on the boundary of the current division unit is determined by further considering a third flag regarding whether filtering is performed on the boundary of a neighboring division unit adjacent to the current block unit.

11. In paragraph 10, An image encoding method, wherein the position of the neighboring division unit is determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.

12. In the 7th paragraph, the step of performing the filtering comprises: A step for specifying block boundaries for deblocking filtering; A step of deriving a decision value for the above block boundary; A step of determining a filter type for the deblocking filtering based on the above decision value; and An image encoding method, comprising the step of performing filtering on the block boundary based on the filter type.