Image encoding / decoding method and device based on loop filter
By dividing the image into multiple units and applying adaptive filtering technology, it solves the problems of low image compression efficiency and inflexible filter application in the existing technology, achieves more efficient image encoding and decoding, and improves image quality.
Patent Information
- Application Number
- CN202410934213.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-18
- Filing Date
- 2020-09-10
- Publication Date
- 2024-09-24
AI Technical Summary
Existing technology is difficult to effectively divide and process high-definition and ultra-high-definition images, resulting in low image compression efficiency, and the application of existing filtering technology at image boundaries is not flexible enough, affecting image quality.
By dividing the image into multiple division units and determining whether to perform filtering on the boundaries of the division units based on predetermined flags, adaptive deblocking filters and loop filtering techniques are used to optimize the image encoding and decoding process.
It improves image coding and decoding efficiency, improves image quality, and accurately processes image boundaries through adaptive filtering technology, enhancing the efficiency and quality of image compression and transmission.
Smart Images

Figure CN118694977A
Abstract
Description
[0001] This application is a divisional application of the Chinese invention patent application with the application date of September 10, 2020, application number 202080065375.X and invention name “Image encoding / decoding method and device based on loop filter”. Technical Field
[0002] The invention relates to an image encoding / decoding method and device. Background Art
[0003] Recently, demands for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, have been increasing in various application fields, and thus, efficient image compression technology is being discussed.
[0004] For image compression technology, there are various technologies, such as inter-frame prediction technology that uses image compression technology to predict pixel values included in a current picture from pictures before or after the current picture, intra-frame prediction technology that uses pixel information in the current picture to predict pixel values included in the current picture, and entropy coding technology that assigns short codes to values with high occurrence frequencies and assigns long codes to values with low occurrence frequencies, and by using such image compression technology, image data can be efficiently compressed and transmitted or stored. Summary of the invention
[0005] Technical issues
[0006] The object of the present invention is to provide a method and apparatus for dividing a picture into predetermined division units.
[0007] An object of the present invention is to provide a method and apparatus for adaptively performing filtering on the boundary of a partition unit.
[0008] An object of the present invention is to provide a method and apparatus for applying an improved deblocking filter.
[0009] Technical Solution
[0010] According to the present invention, a method for decoding an image performed by an image decoding device includes: obtaining a reconstructed image of a current picture; determining whether to perform filtering on a boundary of a current partition unit based on a predetermined flag, the current partition unit being one of a plurality of partition units belonging to the current picture; and performing filtering on the boundary of the current partition unit in response to the determination, wherein each of the partition units includes at least one of a sub-picture, a slice, or a tile, wherein the flag includes at least one of a first flag indicating whether filtering is performed on a boundary of the partition unit within the current picture or a second flag indicating whether filtering is performed on the boundary of the current partition unit, wherein whether filtering is performed on the boundary of the current partition unit is determined by further considering a third flag indicating whether filtering is performed on a boundary of an adjacent partition unit adjacent to the current partition unit, wherein when the first flag is a first value, a restriction is imposed so that filtering is not performed on the boundary of the partition unit within the current picture, and when the first flag is a second value, the restriction is not imposed on the boundary of the partition unit within the current picture, and wherein the adjacent partition unit is determined based on whether the boundary of the current partition unit is a vertical boundary or a horizontal boundary.
[0011] According to the present invention, a method for encoding an image performed by an image encoding device includes: obtaining a reconstructed image of a current image; determining and encoding whether to perform filtering on a boundary of a current partition unit, wherein the current partition unit is one of a plurality of partition units belonging to the current image; and performing filtering on the boundary of the current partition unit in response to the determination, wherein each of the partition units includes at least one of a sub-image, a slice, or a tile, wherein the determination and encoding whether to perform filtering on the boundary of the current partition unit includes a first flag indicating whether filtering is performed on a boundary of a partition unit within the current image or a flag indicating whether filtering is performed on all the partition units within the current partition unit. The method comprises encoding at least one of a second flag indicating whether filtering is performed on the boundary of the current partition unit, wherein whether filtering is performed on the boundary of the current partition unit is determined by further considering a third flag indicating whether filtering is performed on the boundary of a neighboring partition unit adjacent to the current partition unit, wherein when the first flag is a first value, a restriction is made so that filtering is not performed on the boundary of the partition unit in the current picture, and when the first flag is a second value, the restriction is not applied on the boundary of the partition unit in the current picture, and wherein, wherein the neighboring partition unit is determined based on whether the boundary of the current partition unit is a vertical boundary or a horizontal boundary.
[0012] A non-transitory computer-readable storage medium according to the present invention stores a bit stream generated by a method of encoding an image, the method including the method of encoding an image as described above.
[0013] According to the present invention, a method of transmitting a bit stream generated by an image encoding method is provided, wherein the image encoding method includes the method of encoding an image as described above.
[0014] According to the video decoding method and apparatus of the present invention, a picture can be divided into a plurality of division units, whether filtering is performed on a boundary of a current division unit is determined based on a predetermined flag, and in response to the determination, filtering is performed on the boundary of the current division unit.
[0015] In the video decoding method and apparatus according to the present invention, the partition unit may include at least one of a sub-picture, a slice, or a tile.
[0016] In the video decoding method and apparatus according to the present invention, the flag may include at least one of: a first flag indicating whether filtering is performed on a boundary of a partition unit within a picture, or a second flag indicating whether filtering is performed on a boundary of a current partition unit in the picture.
[0017] In the video decoding method and device according to the present invention, when the first flag is a first value, there may be no restriction so that filtering is not performed on the boundary of the division unit within the picture, and when the first flag is a second value, the restriction may not be imposed on the boundary of the division unit within the picture.
[0018] In the video decoding method and apparatus according to the present invention, when the second flag is a first value, restrictions may be imposed so that filtering is not performed on the boundary of the current partition unit, and when the second flag is a second value, filtering may be allowed to be performed on the boundary of the current partition unit.
[0019] In the video decoding method and apparatus according to the present invention, the second flag may be decoded only when a restriction that filtering is not performed on a boundary of a division unit within the one picture is not performed according to the first flag.
[0020] In the video decoding method and apparatus according to the present invention, whether filtering is performed on a boundary of a current partition unit may be determined by further considering a third flag indicating whether filtering is performed on a boundary of an adjacent partition unit adjacent to the current block unit.
[0021] In the video decoding method and apparatus according to the present invention, the position of the adjacent split unit may be determined based on whether the boundary of the current split unit is a vertical boundary or a horizontal boundary.
[0022] In the video decoding method and apparatus according to the present invention, the step of performing filtering may include: specifying a block boundary for deblocking filtering, deriving a decision value for the block boundary, determining a filtering type for the deblocking filtering based on the decision value, and performing filtering on the block boundary based on the filtering type.
[0023] The video encoding method and apparatus according to the present invention can divide a picture into a plurality of division units, determine whether to perform filtering on a boundary of a current division unit, and perform filtering on a boundary of the current division unit in response to determining.
[0024] In the video encoding method and apparatus according to the present invention, the partition unit may include at least one of a sub-picture, a slice, or a tile.
[0025] In the video encoding method and device according to the present invention, the step of determining whether to perform filtering on the boundary of the current partition unit may include encoding at least one of a first flag indicating whether filtering is performed on the boundary of the partition unit within a picture or a second flag indicating whether filtering is performed on the boundary of the current partition unit in the picture.
[0026] In the video encoding method and apparatus according to the present invention, when it is determined that filtering is restricted so as not to be performed on the boundary of the partition unit within the picture, the first flag can be encoded as a first value, and when it is determined that the restriction is not imposed on the boundary of the partition unit within the picture, the first flag can be encoded as a second value.
[0027] In the video encoding method and device according to the present invention, when it is determined that filtering is restricted and not performed on the boundary of the current partition unit, the second flag can be encoded as a first value, and when it is determined that filtering is allowed to be performed on the boundary of the current partition unit, the second flag can be encoded as a second value.
[0028] In the video encoding method and apparatus according to the present invention, the second flag may be encoded only when there is no restriction such that filtering is not performed on the boundary of the division unit within the one picture.
[0029] In the video encoding method and apparatus according to the present invention, whether to perform filtering on the boundary of the current partition unit may be determined by further considering a third flag indicating whether to perform filtering on the boundary of an adjacent partition unit adjacent to the current block unit.
[0030] In the video encoding method and apparatus according to the present invention, the position of the adjacent split unit may be determined based on whether the boundary of the current split unit is a vertical boundary or a horizontal boundary.
[0031] In the video encoding method and apparatus according to the present invention, the step of performing filtering may include: specifying a block boundary for deblocking filtering, deriving a decision value for the block boundary, determining a filtering type for the deblocking filtering based on the decision value, and performing filtering on the block boundary based on the filtering type.
[0032] Beneficial Effects
[0033] According to the present invention, encoding / decoding efficiency can be improved by dividing a picture into various division units.
[0034] According to the present invention, encoding / decoding efficiency can be improved by adaptively performing filtering on the boundary of a division unit.
[0035] According to the present invention, image quality can be improved by applying an improved deblocking filter to the reconstructed image. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
[0037] Figure 2 is a block diagram showing an image decoding apparatus according to an embodiment of the present invention.
[0038] Figures 3 to 6 The diagram illustrates a method of dividing a picture into one or more division units according to the present disclosure.
[0039] Figure 7 A method of performing filtering based on a predetermined flag according to the present disclosure is illustrated.
[0040] Figures 8 to 15 A method of determining whether to perform filtering on a boundary of a partition unit based on one or more flags according to the present disclosure is illustrated.
[0041] Fig.16 A method of applying a deblocking filter according to the present disclosure is illustrated. DETAILED DESCRIPTION
[0042] The image decoding method and apparatus of the present invention can divide a 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.
[0043] In the image decoding method and apparatus of the present invention, the division unit may include at least one of a sub-picture, a slice, or a tile.
[0044] In the image decoding method and device of the present invention, the flag may include at least one of the following: a first flag indicating whether filtering is performed on the boundary of the partition unit within a picture, or a second flag indicating whether filtering is performed on the boundary of the current partition unit in the picture.
[0045] In the image decoding method and device of the present invention, when the first flag is a first value, there may be no restriction so that filtering is not performed on the boundary of the division unit within the picture, and when the first flag is a second value, the restriction may not be imposed on the boundary of the division unit within the picture.
[0046] In the image decoding method and device of the present invention, when the second flag is a first value, restrictions can be imposed so that filtering is not performed on the boundary of the current partition unit, and when the second flag is a second value, filtering can be performed on the boundary of the current partition unit.
[0047] In the image decoding method and apparatus of the present invention, the second flag may be decoded only when the restriction that filtering is not performed on the boundary of the division unit within the one picture is not performed according to the first flag.
[0048] In the image decoding method and apparatus of the present invention, whether filtering is performed on a boundary of a current partition unit may be determined by further considering a third flag indicating whether filtering is performed on a boundary of an adjacent partition unit adjacent to the current block unit.
[0049] In the image decoding method and apparatus of the present invention, the position of the adjacent division unit can be determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.
[0050] In the image decoding method and apparatus of the present invention, performing filtering may include: specifying a block boundary for deblocking filtering, deriving a decision value for the block boundary, determining a filtering type for deblocking filtering based on the decision value, and performing filtering on the block boundary based on the filtering type.
[0051] The image encoding method and apparatus of the present invention can divide a 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 determining.
[0052] In the image encoding method and apparatus of the present invention, the division unit may include at least one of a sub-picture, a slice, or a tile.
[0053] In the image encoding method and device of the present invention, determining whether to perform filtering on the boundary of the current partition unit may include encoding at least one of a first flag indicating whether filtering is performed on the boundary of the partition unit within a picture or a second flag indicating whether filtering is performed on the boundary of the current partition unit in the picture.
[0054] In the image encoding method and device of the present invention, when it is determined that filtering is restricted and not performed on the boundary of the division unit within the picture, the first flag can be encoded as a first value, and when it is determined that the restriction is not imposed on the boundary of the division unit within the picture, the first flag can be encoded as a second value.
[0055] In the image encoding method and device of the present invention, when it is determined that filtering is restricted and not performed on the boundary of the current partition unit, the second flag can be encoded as a first value, and when it is determined that filtering is allowed to be performed on the boundary of the current partition unit, the second flag can be encoded as a second value.
[0056] In the image encoding method and apparatus of the present invention, the second flag may be encoded only when there is no restriction that filtering is not performed on the boundary of the division unit within the one picture.
[0057] In the image encoding method and apparatus of the present invention, whether filtering is performed on a boundary of a current partition unit may be determined by further considering a third flag indicating whether filtering is performed on a boundary of an adjacent partition unit adjacent to the current block unit.
[0058] In the image encoding method and apparatus of the present invention, the position of the adjacent division unit can be determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.
[0059] In the image encoding method and device of the present invention, performing filtering may include: specifying block boundaries for deblocking filtering, deriving decision values for the block boundaries, determining the filtering type of the deblocking filtering based on the decision values, and performing filtering on the block boundaries based on the filtering type.
[0060] In the present invention, various modifications can be made and various embodiments can be provided, and specific embodiments will be 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 should be understood to include all changes, equivalents and substitutes within the scope and spirit of the present invention. When describing each of the accompanying drawings, similar reference numerals are used for similar elements.
[0061] Terms such as first and second can be used to describe various components, but components should not be limited by these terms. These terms are only used for the purpose of distinguishing one component from another component. For example, without departing from the scope of the present invention, the first component can be referred to as the second component, and similarly, the second component can be referred to as the first component. The term and / or includes a combination of multiple related listed items or any one of multiple related listed items.
[0062] When a component is referred to as being "connected" or "connected" to another component, it may be directly connected or connected to the other component, but it should be understood that other components may exist in between. On the other hand, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.
[0063] The terms used in this application are only used to describe specific embodiments and are not intended to limit the present invention. Unless the context clearly indicates otherwise, singular expressions include plural expressions. In this application, terms such as "including" or "having" are intended to represent the presence of features, quantities, steps, actions, components, parts or combinations thereof described in the specification, but one or more other features. It should be understood that the presence or addition of an element or quantity, step, action, component, part or combination thereof is not precluded.
[0064] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. In the following, the same reference numerals are used for the same elements in the accompanying drawings, and repeated descriptions of the same elements are omitted.
[0065] Figure 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
[0066] refer to Figure 1 The image encoding device 100 may include a picture division unit 110, prediction units 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.
[0067] Figure 1Each component shown in is shown independently to represent different characteristic functions in the image encoding device, and does not mean that each component is formed by separate hardware or a single software component. That is, for ease of explanation, each component is listed and included as its own component, at least two components of each component are combined to form a component, or a component can be divided into multiple components to perform functions. Unless it departs from the essence of the present invention, the integrated embodiment and the separate embodiment of the component are also included in the scope of the present invention.
[0068] In addition, some components may not be basic components that perform the basic functions in the present invention, but may be optional components that are only used to improve performance. The present invention can be implemented by only including basic components for realizing the essence of the present invention without including components for improving performance, and a structure that only includes basic components without including optional components for improving performance can also be included in the scope of the present invention.
[0069] The picture division unit 110 may divide the input picture into at least one processing unit. In this case, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture division unit 110 may encode the picture by dividing into a plurality of combinations of coding units, prediction units, and transform units and selecting a combination of coding units, prediction units, and transform units based on a predetermined criterion (e.g., a cost function).
[0070] For example, a picture can be divided into a plurality of decoding units. In order to divide the decoding units in the picture, a recursive tree structure such as a quadtree structure can be used, and the decoding unit or the largest decoding unit as the root, which is divided into other decoding units based on an image, can be divided into as many child nodes as the number of divided decoding units. The decoding unit that is no longer divided according to certain restrictions becomes a leaf node. That is, when it is assumed that only a square division can be performed on a decoding unit, a decoding unit can be divided into up to four different decoding units.
[0071] Hereinafter, in the embodiments of the present invention, a decoding unit may be used as the meaning of a unit that performs encoding, or may be used as the meaning of a unit that performs decoding.
[0072] The prediction units may be obtained by dividing one coding unit into at least one square or non-square shape of the same size. One coding unit may be divided such that one of the prediction units has a different shape and / or size from another prediction unit.
[0073] When a prediction unit on which intra prediction is performed based on a coding unit is not a minimum coding unit, intra prediction may be performed without being split into a plurality of NxN prediction units.
[0074] The prediction units 120 and 125 may include an inter-frame prediction unit 120 that performs inter-frame prediction and an intra-frame prediction unit 125 that performs intra-frame prediction. It may be determined whether inter-frame prediction or intra-frame prediction is used for the prediction unit, and specific information (e.g., intra-frame prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. In this case, the processing unit that performs the prediction may be different from the processing unit that determines the prediction method and the specific content. For example, the prediction method and prediction mode are determined in the prediction unit, and the prediction may be performed in the transform unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130. In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded by the entropy encoding unit 165 together with the residual value and transmitted to the decoder together. In the case of using a specific encoding mode, the original block may be encoded as it is and sent to the decoder without generating a prediction block through the prediction units 120 and 125.
[0075] The inter-frame prediction unit 120 may predict a prediction unit based on information of at least one of a previous picture or a subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of some areas in the current picture where encoding has been completed. The inter-frame prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0076] The reference picture interpolation unit may receive reference picture information from the memory 155 and generate pixel information of integer pixels or less in the reference picture. In the case of luma pixels, an 8-tap DCT-based interpolation filter (DCT-based interpolation filter) with different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1 / 4 pixels. In the case of chrominance signals, a 4-tap DCT-based interpolation filter (DCT-based interpolation filter) with different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1 / 8 pixels.
[0077] The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit. As a method of calculating a motion vector, various methods may be used, such as a full search based block matching algorithm (FBMA), a three-step search (TSS), and a new three-step search algorithm (NTS). The motion vector may have a motion vector value in units of 1 / 2 or 1 / 4 pixels based on the interpolated pixels. The motion prediction unit may predict the current prediction unit by using motion prediction methods differently. Various methods such as a skip method, a merge method, an AMVP (Advanced Motion Vector Prediction) method, and an intra-block copy method may be used as motion prediction methods.
[0078] The intra prediction unit 125 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. When the neighboring block of the current prediction unit is a block for performing inter-frame prediction and the reference pixel is a pixel for performing inter-frame prediction, the reference pixel included in the block for performing inter-frame prediction may be used by replacing it with reference pixel information of the block for performing intra-frame prediction around it. That is, when the reference pixel is unavailable, the unavailable reference pixel information may be used by replacing it with at least one reference pixel among the available reference pixels.
[0079] In intra prediction, the prediction mode may have a directional prediction mode using reference pixel information according to a prediction direction and a non-directional mode not using directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information may be different, and the intra prediction mode information for predicting luminance information or the predicted luminance signal information may be used to predict chrominance information.
[0080] When performing intra prediction, when the size of the prediction unit and the size of the transform unit are the same, intra prediction can be performed on the prediction unit based on the pixel on the left, the pixel on the upper left, and the pixel on the upper side of the prediction unit. However, when performing intra prediction, when the size of the prediction unit and the size of the transform unit are different, intra prediction can be performed using reference pixels based on the transform unit. In addition, intra prediction using N×N partitioning can be used only for the minimum decoding unit.
[0081] The intra prediction method can generate a prediction block according to a prediction mode after applying an AIS (Adaptive Intra Smoothing) filter to reference pixels. The type of AIS filter applied to the reference pixels 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 the 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 adjacent prediction units, if the intra prediction modes of the current prediction unit and the adjacent prediction units are the same, predetermined flag information can be used to transmit information indicating that the prediction modes of the current prediction unit and the adjacent prediction units are the same, and if the prediction modes of the current prediction unit and the adjacent prediction units are different, entropy coding can be performed to encode the prediction mode information of the current block.
[0082] In addition, a residual block including residual information which is a difference value between a prediction unit predicted based on the prediction unit generated by the prediction units 120 and 125 and an original block of the prediction unit may be generated. The generated residual block may be input to the transform unit 130.
[0083] The transform unit 130 may transform a residual block including residual information between the prediction unit generated by the prediction units 120 and 125 and the original block by using a transform method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), and KLT. Whether to apply DCT, DST, or KLT to transform the residual block may be determined based on intra prediction mode information of the prediction unit used to generate the residual block.
[0084] The quantization unit 135 may quantize the value transformed into the frequency domain by the transform unit 130. The quantization coefficient may vary depending on the importance of the block or image. The value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160.
[0085] The rearrangement unit 160 may perform rearrangement on coefficient values for the quantized residual value.
[0086] The rearrangement unit 160 may change the coefficients in the 2D block form into a 1D vector form by a coefficient scanning method. For example, the rearrangement unit 160 may change into a 1D vector form by scanning from a DC coefficient to a coefficient in a high frequency region according to a zig-zag scanning method. Depending on the size of the transform unit and the intra prediction mode, vertical scanning of the scanning coefficients in the 2D block form in the column direction and horizontal scanning of the scanning coefficients in the 2D block form in the row direction may be used instead of the zig-zag scanning. That is, depending on the size of the transform unit and the intra prediction mode, it may be determined which of the zig-zag scanning, the vertical scanning, and the horizontal scanning is used.
[0087] The entropy encoding unit 165 may perform entropy encoding based on the value calculated by the rearrangement unit 160. Various encoding methods such as Exponential Golomb, CAVLC (Context Adaptive Variable Length Coding), and CABAC (Context Adaptive Binary Arithmetic Coding) may be used for the entropy encoding.
[0088] The entropy encoder 165 may encode various information such as residual value coefficient information, block type information, prediction mode information, partition unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, filtering information, and the like.
[0089] The entropy encoder 165 may entropy encode the coefficient values of the decoding unit input from the rearrangement unit 160 .
[0090] The inverse quantization unit 140 and the inverse transform unit 145 inversely quantize the value quantized by the quantization unit 135 and inversely transform the value transformed by the transform unit 130. A reconstructed block may be generated by a combination of the residual value generated by the inverse quantization unit 140 and the inverse transform unit 145 and a prediction unit predicted by a motion estimation unit, a motion compensation unit, and an intra prediction unit included in the prediction units 120 and 125.
[0091] The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
[0092] The deblocking filter can remove block distortion caused by the boundaries between blocks in the reconstructed picture. In order to determine whether to perform deblocking, it can be determined whether to apply the deblocking filter to the current block based on the pixels included in the number of columns or rows included in the block. When the deblocking filter is applied to the block, a strong filter or a weak filter can be applied according to the required deblocking filter strength. In addition, when applying the deblocking filter, horizontal filtering and vertical filtering can be processed in parallel when performing vertical filtering and horizontal filtering.
[0093] The offset correction unit can correct the offset from the original image in units of pixels for the deblocked filtered image. In order to perform offset correction on a specific picture, after classifying the pixels contained in the image into a certain number of regions and determining the regions to which the offset is applied, a method of applying the offset to a region or a method of applying the offset by considering edge information of each pixel can be used.
[0094] ALF (Adaptive Loop Filter) may be performed based on a value obtained by comparing a filtered reconstructed image with an original image. After the pixels included in the image are classified into predetermined groups, a filter to be applied to the group may be determined to perform filtering differently for each group. Information related to whether ALF is applied may be transmitted for each decoding unit (CU) of a luminance signal, and the shape and filter coefficient of the ALF filter to be applied may vary according to each block. In addition, the same type (fixed type) of ALF filter may be applied regardless of the characteristics of the block to be applied.
[0095] The memory 155 may store the reconstructed block or picture output from the filter unit 150 , and may provide the stored reconstructed block or picture to the prediction units 120 and 125 when inter prediction is performed.
[0096] Figure 2 is a block diagram showing an image decoding apparatus according to an embodiment of the present invention.
[0097] refer to Figure 2The image decoder 200 may include an entropy decoding unit 210 , a rearrangement unit 215 , an inverse quantization unit 220 , an inverse transform unit 225 , prediction units 230 , 235 , a filter unit 240 , and a memory 245 .
[0098] When an image bitstream is input from an image encoder, the input bitstream may be decoded in a reverse process to that of the image encoder.
[0099] The entropy decoding unit 210 may perform entropy decoding in a process opposite to the process performed by entropy encoding in the entropy encoding unit of the image encoder. For example, various methods corresponding to methods performed in the image encoder, such as exponential Golomb (CAVLC), context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC), may be applied.
[0100] The entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed by the encoder.
[0101] The rearrangement unit 215 may perform rearrangement on the bit stream entropy-decoded by the entropy decoding unit 210 based on the rearrangement method of the encoding unit. The coefficients in the form of a 1-dimensional vector may be rearranged into coefficients in the form of a 2-dimensional block again. The rearrangement unit 215 may perform rearrangement by receiving information related to coefficient scanning performed by an encoder and performing a reverse scanning method based on a scanning order performed by a corresponding encoder.
[0102] The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoder and the coefficients of the reordered block.
[0103] The inverse transform unit 225 may perform an inverse transform (i.e., inverse DCT, inverse DST, and inverse KLT) corresponding to the transform (i.e., DCT, DST, and KLT) performed by the transform unit on the quantization result performed by the image encoder. The inverse transform may be performed based on the transmission unit determined by the image encoder. In the inverse transform unit 225 of the image decoder, the transform method (e.g., DCT, DST, KLT) may be selectively performed according to a plurality of information such as a prediction method, a size of a current block, and a prediction direction.
[0104] The prediction units 230 and 235 may generate a prediction block based on the prediction block generation related information provided by the entropy decoding unit 210 and previously decoded block or picture information provided by the memory 245 .
[0105] As described above, when intra prediction is performed in the same manner as in the image encoder, when the size of the prediction unit and the size of the transform unit are the same, intra prediction of the prediction unit can be performed based on pixels located at the left side, upper left corner, and top of the prediction unit. However, when the size of the prediction unit and the size of the transform unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transform unit. In addition, intra prediction using NxN partitioning can be used only for the minimum decoding unit.
[0106] The prediction units 230 and 235 may include a prediction unit determination unit, an inter-frame prediction unit, and an intra-frame prediction unit. The prediction unit determination unit may receive various information such as prediction unit information, prediction mode information of an intra-frame prediction method, and motion prediction related information of an inter-frame prediction method from the entropy decoding unit 210, classify the prediction unit from the current decoding unit, and determine whether the prediction unit performs inter-frame prediction or intra-frame prediction. The inter-frame prediction unit 230 may perform inter-frame 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 by using information required for inter-frame prediction of the current prediction unit provided by the image encoder. Alternatively, inter-frame prediction may be performed based on information about a partial area previously reconstructed in the current picture including the current prediction unit.
[0107] In order to perform inter prediction, a motion prediction method of a prediction unit included in a coding unit may be determined in skip mode, merge mode, AMVP mode, and intra block copy mode.
[0108] The intra prediction unit 235 can generate a prediction block based on pixel information in the current picture. When the prediction unit is a prediction unit that has performed intra prediction, intra prediction can be performed based on the intra prediction mode information of the prediction unit provided by the image encoder. The intra prediction unit 235 may include an adaptive intra smoothing (AIS) 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 be applied by determining whether to apply the filter according to the prediction mode of the current prediction unit. By using the prediction mode provided by the image encoder and the AIS filter information of the prediction unit, AIS filtering can be performed on the reference pixels of the current block. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.
[0109] When the prediction mode of the prediction unit is a prediction unit that performs intra-frame prediction based on a pixel value obtained by interpolating reference pixels, the reference pixel interpolation unit may interpolate the reference pixels to generate integer pixels or less reference pixels. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating reference pixels, the reference pixels may not be interpolated. When the prediction mode of the current block is a DC mode, the DC filter may generate a prediction block by filtering.
[0110] The reconstructed block or picture may be provided to the filter unit 240. The filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
[0111] Information about whether to apply a deblocking filter to a corresponding block or picture and information about whether to apply a strong filter or a weak filter when applying the deblocking filter can be provided from the video encoder. In the deblocking filter of the video decoder, information related to the deblocking filter provided by the video encoder can be provided, and the video decoder can perform deblocking filtering on the corresponding block.
[0112] The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding and the offset value information.
[0113] ALF may be applied to the decoding unit based on information provided by the encoder on whether to apply ALF and ALF coefficient information, etc. The ALF information may be provided from a specific parameter set.
[0114] The memory 245 may store the reconstructed picture or block so that it may be used as a reference picture or a reference block, and may also provide the reconstructed picture to the output unit.
[0115] As described above, in the embodiment of the present invention, for convenience of description, the decoding unit is used as the encoding unit, but it may be a unit that performs not only encoding but also decoding.
[0116] Figures 3 to 6 A method for dividing a picture into one or more division units according to the present disclosure is shown.
[0117] A picture may be divided into division units predefined in the encoding / decoding apparatus. Here, the predefined division unit may include at least one of a sub-picture, a slice, a tile, or a brick.
[0118] Specifically, a picture may be divided into one or more tile rows or one or more tile columns. In this case, a tile may represent a group of blocks covering a predetermined rectangular area in a picture. Here, a block may refer to a decoding tree block (maximum decoding block). The decoding tree blocks belonging to a tile may be scanned based on a raster scan order.
[0119] A tile may be divided into one or more tiles. A tile may consist of blocks in rows or columns of a tile. That is, the division into tiles may be performed only in the vertical direction or in the horizontal direction. However, the present invention is not limited thereto, and a tile may be divided into multiple tiles based on one or more vertical lines and one or more horizontal lines. A tile may be a sub-concept of a tile and may be referred to as a sub-tile.
[0120] A slice may include one or more tiles. Alternatively, a slice may include one or more tiles. Alternatively, a slice may be defined as one or more coding tree block rows (CTU rows) in a tile. Alternatively, a slice may be defined as one or more coding tree block columns (CTU columns) within a tile. That is, a tile may be set to a slice, and a tile may consist of multiple slices. When a tile is divided into multiple slices, the division may be restricted to be performed only in the horizontal direction. 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 is different from the horizontal boundary of the tile, but may coincide with the horizontal boundary of the coding tree block in the tile. On the other hand, the division may be restricted to be performed only in the vertical direction.
[0121] 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 and a rectangular slice mode. In the case of the raster scan mode, a slice may include a series of tiles (or blocks, tiles) according to a raster scan order. In the case of the rectangular slice mode, a slice may include multiple tiles forming a rectangular area, or may include one or more row (or column) decoding tree blocks in a tile forming a rectangular area.
[0122] Information about the partitioning mode of the slice may be explicitly encoded by the encoding device and signaled to the decoding device, or may be implicitly determined by the encoding / decoding device. For example, a flag indicating whether it is a rectangular slice mode 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 at least one level of a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a picture header (PH).
[0123] As described above, one slice may be configured in rectangular units including one or more blocks, tiles, or tiles, and position and size information of the slice may be represented in the corresponding unit.
[0124] A sub-picture may include one or more slices. Here, a slice may cover a rectangular area within a picture. That is, the boundary of a sub-picture may always coincide with the boundary of a slice, and the vertical boundary of a sub-picture may always coincide with the vertical boundary of a slice. All coding tree blocks (CTUs) belonging to a sub-picture may belong to the same tile. All coding tree blocks belonging to a tile may belong to the same sub-picture.
[0125] In the present invention, a picture may be composed of one or more sub-pictures, a sub-picture may be composed of one or more slices, tiles or blocks, a slice may be composed of one or more tiles or blocks, and a tile may be composed of one or more tiles. It is described assuming that it can be configured, but is not limited thereto. That is, as described above, a tile may be composed of one or more slices.
[0126] The partition unit may be composed of an integer number of blocks, but is not limited thereto, and may be composed of decimal numbers instead of integers. That is, when it is not composed of an integer number of blocks, at least one partition unit may be composed of sub-blocks. Figure 3 An example of slicing according to a raster scan pattern is shown. Figure 3 , it can be seen that it consists of 18x12 blocks (per column and row), 12 tiles and 3 slices. Here, a slice can be considered as an example of a group of blocks or tiles according to a predetermined scan (raster scan).
[0127] Figure 4 An example of slicing according to a rectangular slicing pattern is shown. Figure 4 , it can be seen that it consists of 18x12 blocks, 24 tiles and 9 slices. Here, 24 tiles can be represented by 6 tile columns and 4 tile rows.
[0128] Figure 5 Illustration showing an example where an image is divided into tiles and rectangular slices. Figure 5 , an image can be composed of 11 tiles, 4 tiles (2 tile columns and 2 tile rows), and 4 slices.
[0129] Figure 6 The figure shows an example of dividing an image into multiple sub-images. Figure 6, a picture can be composed of 18 tiles. Here, the 4x4 blocks on the left (i.e., 16 CTUs) can constitute a tile, and the 2x4 blocks on the right (i.e., 8 CTUs) can constitute a tile. Moreover, like the tiles on the left, a tile can be a sub-picture (or slice), and like the tiles on the right, a tile can be composed of two sub-pictures (or slices).
[0130] Table 1 shows an example of division or configuration information about sub-pictures and encoding control information (eg, information about whether to apply a loop filter to a boundary, etc.) according to the present disclosure.
[0131]
Table 1
[0132]
[0133] In Table 1, subpics_present_flag indicates whether sub-pictures are supported, and when sub-pictures are supported (when 1), information about the number of sub-pictures (max_subpic_minus1) or information about the width or height of the sub-picture (subpic_grid_col_width_minus1, subpic_grid_row_height_minus1) may be generated. At this time, length information such as width and height may be represented as is (for example, in units of 1 pixel), or may be represented as a multiple of a predetermined unit / constant (such as an integer of 2, 4, 8, 16, 32, 64, 128, or a maximum decoding unit, a minimum decoding unit, a maximum transform unit, a minimum transform unit, etc.), an exponent, etc.
[0134] Here, based on the width and height of the picture, and the width and height of each sub-picture (equal length), how many sub-pictures there are in the picture in columns and rows (NumSubPicGridRows, NumSubPicGridCols) can be derived. In addition, how many sub-pictures there are in the picture (NumSubPics) can also be derived.
[0135] The above example assumes that the width or height of each sub-picture is uniform, but it is also possible that at least one of the width or height of each sub-picture is not uniform. Therefore, a flag that specifies whether all sub-pictures constituting one picture have the same size can be used.
[0136] When all sub-pictures do not have the same size according to the flag, the position information of each sub-picture and the size information of each sub-picture may be encoded / decoded. On the other hand, when all sub-pictures have the same size according to the flag, the size information may be encoded / decoded only for the first sub-picture.
[0137] Information about how many sub-pictures exist in a picture in units of columns or rows may be generated, and information about the width or height of each sub-picture may be individually generated.
[0138] After the sub-picture is divided into columns and rows, the index of each sub-picture can be assigned. In the implicit case, the index can be assigned based on a predetermined scanning order (raster scanning, etc.) (for example, 0, 1, 2, etc. indexes are assigned to the first sub-picture row from left to right), but explicit index information (subpic_grid_idx) of each sub-picture can be generated.
[0139] In the case of a sub-picture, it can be determined during the decoding process excluding the loop filtering operation whether it is set as a picture (subpic_treatment_as_pic_flag). This can be operated in conjunction with whether the sub-picture can be treated as an independent picture (when the flag is 1) in the processing such as the reference picture list for inter-frame prediction.
[0140] It can be determined whether all sub-pictures within a picture are set as pictures (one flag is applied in common), or it can be determined whether they are set as pictures individually (multiple flags are applied individually). Here, only when there is no restriction on treating all sub-pictures as pictures according to one flag applied in common, multiple separate flags can be encoded / decoded for each sub-picture.
[0141] In addition, loop_fiter_across_subpic_enabled_flag[i] can determine whether to perform filtering operations across the boundary of the i-th sub-picture. If it is 1, the filtering operation is performed across the boundary of the i-th sub-picture, and if it is 0, it is not performed.
[0142] Here, the part related to loop_fitler_across_subpic_enabled_flag can be applied in the same / similar manner not only in the case of the syntax element but also in the example of processing boundaries of various partition units described later.
[0143] An area located at the border of a picture cannot be referenced or filtered because there is no data outside the picture. That is, an area located inside the picture can be referenced or filtered.
[0144] On the other hand, even within a picture, it can be divided into sub-pictures, slices, slices, tiles, etc. In the case of some division units, whether to refer to the areas adjacent to both sides of the boundaries of different division units, whether to perform filtering, etc. can be adaptively determined.
[0145] Here, whether to cross-reference two areas adjacent to the boundary may be determined by explicit information or may be determined implicitly.
[0146] Here, whether boundary filtering (eg, a loop filter or an intra-loop filter, a deblocking filter, SAO, ALF, etc.) is performed may be determined by explicit information or may be implicitly determined.
[0147] For example, in the case of some units A, it is possible to cross-reference the encoding / decoding between the division units, and filtering can be performed on the boundaries of the division units. For example, in the case of some units B, cross-reference of encoding / decoding between division units may be prohibited, and filtering cannot be performed on the boundaries of the division units. For example, in the case of some units C, cross-reference of encoding / decoding between division units may be prohibited, and filtering can be performed on the boundaries of the division units. For example, in the case of some units D, it is possible to cross-reference the encoding / decoding between division units, and it can be determined based on predetermined flag information whether to perform filtering at the boundaries of the division units. For example, in the case of some units (E), it can be determined based on predetermined flag information whether to cross-reference the encoding / decoding between division units, and it can be determined based on predetermined flag information whether to perform filtering on the boundaries of the division units.
[0148] The A to E partition units may correspond to at least one of the above-mentioned sub-pictures, slices, tiles, or tiles. For example, all the partition units A to E may be sub-pictures, tiles, or slices. Alternatively, some of the A to E partition units may be sub-pictures, while the rest may be slices or tiles. Alternatively, some of the A to E partition units may be slices, while the rest may be tiles.
[0149] Figure 7 A method of performing filtering based on a predetermined flag according to the present disclosure is illustrated.
[0150] refer to Figure 7 , a picture can be divided into a plurality of division units (S700).
[0151] The division unit may be at least one of the aforementioned sub-pictures, slices, tiles, and blocks. For example, a picture may be divided into a plurality of sub-pictures. Of course, in addition to sub-pictures, a picture may also be additionally divided into a plurality of slices and / or tiles. Since the division unit is the same as above, a detailed description will be omitted here.
[0152] refer to Figure 7 , it can be determined whether to perform filtering on the boundary of the division unit based on a predetermined flag (S710).
[0153] For ease of explanation, it is assumed that the division unit in the present disclosure is a sub-picture. However, the present disclosure is not limited to this, and the present disclosure can be applied to the boundaries of slices, tiles, or blocks in the same / similar manner. In addition, the filtering in the present invention may refer to loop filtering applied to the reconstructed picture, and the filter used for loop filtering may include at least one of a deblocking filter (DF), a sample adaptive offset (SAO), or an adaptive loop filter (ALF).
[0154] Splitting units may be supported for purposes such as parallel processing and partial decoding.
[0155] Therefore, when encoding / decoding of each division unit is completed, it may be implicitly or explicitly determined whether filtering is performed at a boundary between division units or filtering is performed at a boundary of a division unit (eg, in a loop filter).
[0156] Specifically, a flag indicating whether filtering is performed at the boundary of a partition unit may be used. Here, the flag may be implicitly determined in an upper unit including a plurality of partition units, or may be explicitly encoded / decoded. The upper unit may mean a picture, or may also mean a unit consisting of only a portion of a partition unit constituting a picture. Alternatively, the flag may be implicitly determined for each partition unit, or may be explicitly encoded / decoded. Alternatively, the flag may be implicitly determined for each boundary of a partition unit, or may be explicitly encoded / decoded. This will refer to Figures 8 to 15 Detailed description.
[0157] refer to Figure 7 , filtering may be performed on the boundary of the division unit in response to the determination in S710 ( S720 ).
[0158] Specifically, at least one of a deblocking filter, a sample adaptive offset, or an adaptive loop filter may be applied to the boundary of the partition unit. The above filters may be applied sequentially according to a predetermined priority. For example, after applying the deblocking filter, the sample adaptive offset may be applied. After applying the sample adaptive offset, the adaptive loop filter may be applied. Fig.16 A method of applying a deblocking filter to a boundary of a partition unit is described in detail.
[0159] Figures 8 to 15 A method of determining whether to perform filtering on a boundary of a partition unit based on one or more flags according to the present disclosure is shown.
[0160] For each type of partition unit, a flag for determining whether filtering is performed at a boundary of the partition unit may be supported. For example, one of the following may be supported: a flag indicating whether filtering is performed on a boundary of a sub-picture (loop_filter_across_subpic_enabled_flag, hereinafter referred to as the first flag), a flag indicating whether filtering is performed on a 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 a 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 a boundary of a tile (loop_filter_across_bricks_enabled_flag, hereinafter referred to as the fourth flag).
[0161] Alternatively, the encoding / decoding device may support only some of the above flags. For example, {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.
[0162] Moreover, all of the above-mentioned first to fourth flags may be explicitly supported, or some of the first to fourth flags may be explicitly supported, and other flags may be implicitly supported. For example, one of the first to fourth flags may be explicitly supported, and another may be implicitly determined based on the explicitly supported flag.
[0163] In the embodiments described later, for convenience of description, the first to fourth flags are referred to as loop_filter_across_enabled_flag. In addition, when the corresponding split unit is supported, it is assumed that the flag is supported.
[0164] Figure 8 An example in which a flag (loop_filter_across_enabled_flag) is supported for one picture including a plurality of partition units is illustrated.
[0165] Referring to Table 2, when the flag (loop_filter_across_enabled_flag) is a first value, filtering is restricted so as not to be performed at the boundary of the division unit in the picture, and when the flag is a second value, the restriction is not imposed on the boundary of the division unit. That is, when the flag is a second value, filtering may be performed on the boundary of the division unit within the picture, or filtering may not be performed.
[0166] In other words, when the flag is a first value, this may mean that the boundary of the partition unit is considered to be the same as the boundary of the picture, and when the flag is a second value, this may mean that no restriction is imposed as follows:
[0167] The boundaries of the partition units are considered to be the same as the boundaries of the picture.
[0168]
Table 2
[0169]
[0170] exist Figure 8 , A to F means one division unit, the presence of an arrow as shown in the left figure may mean that filtering between the boundaries of the division units may be performed, and the absence of an arrow as shown in the right figure may mean that filtering between the boundaries of the division units is restricted and not performed. For ease of explanation, it is assumed that each division unit has a rectangular shape.
[0171] The above-described embodiment refers to the case where it is determined whether to perform filtering collectively on division units in a picture regardless of the vertical relationship between the division units.
[0172] Fig. 9 An example in which a flag is supported separately in an upper unit of a division unit is illustrated. That is, based on the flag of the upper unit, it can be determined whether filtering is performed on the boundary of the division unit existing in the upper unit.
[0173] Referring to Table 3, a flag (loop_filter_across_enabled_flag) may be encoded / decoded for each upper unit. loop_filter_across_enabled_flag[i] may indicate whether filtering is performed on the boundary of the division unit within the i-th upper unit. For example, when the flag is a first value, filtering is restricted so as not to be performed on the boundary of the division unit within the upper unit, and when the flag is a second value, the restriction is not imposed on the boundary of the division unit within the upper unit. That is, when the flag is a second value, filtering may be performed on the boundary of the division unit within the upper unit, or filtering may not be performed.
[0174] Alternatively, when the flag is a first value, filtering may not be performed on the boundary of the division unit within the upper unit, and when the flag is a second value, filtering may be performed on the boundary of the division unit within the upper unit. This may mean that filtering may be performed on at least one boundary of the division unit within the upper unit, or filtering may be performed on the boundaries of all division units within the upper unit.
[0175] In this embodiment, a picture may be composed of multiple superordinate units, and each superordinate unit may be composed of multiple division units. For example, when the superordinate unit is a sub-picture, the division unit may be a tile, a slice, or a block. Alternatively, the superordinate unit may be defined as a group of sub-pictures having a smaller size than the picture, and in this case, the division unit may be a sub-picture, a tile, a slice, or a block.
[0176]
Table 3
[0177]
[0178] The above-described embodiment refers to a case where a flag for determining whether to perform filtering on a boundary of a division unit is supported in an upper unit defined as a group of predetermined division units.
[0179] refer to Fig. 9 , a picture can be composed of two superordinate units (ie, a first superordinate unit composed of A to C and a second superordinate unit composed of D to F).
[0180] In the first upper unit, the flag indicating whether filtering is performed is 0, and in the second upper unit, the flag indicating whether filtering is performed is 1. The boundary between the first upper unit and the division unit belonging to the second upper unit may or may not be filtered by the flag that determines whether filtering of the upper unit is performed.
[0181] Fig.10 The case where the flag is supported (loop_filter_across_enabled_flag) for each division unit constituting one picture is shown.
[0182] Different from Fig. 9 , which is an example of determining whether filtering is performed on the boundary of each partition unit. Therefore, even if the syntax elements are the same as those in Table 2, their meanings may be different.
[0183] Referring to Table 4, a flag (loop_filter_across_enabled_flag) may be encoded / decoded for each partition unit. loop_filter_across_enabled_flag[i] may indicate whether filtering is performed on a boundary of an i-th partition unit in a picture.
[0184] For example, when the flag is a first value, filtering is limited so that filtering is not performed on the boundary of the i-th partition unit in the picture, and when the flag is a second value, filtering may be performed on the boundary of the i-th partition unit in the picture. That is, when the flag is a second value, filtering may be performed on the boundary of the partition unit within the picture, or filtering may not be performed.
[0185] Meanwhile, the flag for each partition unit (loop_filter_across_enabled_flag[i]) may be selectively encoded / decoded based on the flag for one picture (loop_filter_across_enabled_flag). Figure 8 The same as described in the embodiment, and the detailed description will be omitted.
[0186] For example, when filtering is limited so that filtering is not performed on the boundary of the partition unit within the picture according to the flag for one picture, the flag for each partition unit is not encoded / decoded. According to the flag for one picture, the flag for each partition unit can be encoded / decoded only when the restriction is not imposed on the boundary of the partition unit.
[0187] Meanwhile, a flag for one picture and a flag for each partition unit may be encoded / decoded at the same level. Here, the same level may be any one of a video parameter set, a sequence parameter set, or a picture parameter set.
[0188]
Table 4
[0189]
[0190] refer to Fig.10 , based on the flag for each division unit, filtering may be performed on the boundary of the corresponding division unit as shown in the left figure, and filtering may not be performed on the boundary of the corresponding division unit as shown in the right figure.
[0191] Fig.11 A method of determining whether to perform filtering according to the boundary position of the division unit is illustrated.
[0192] This embodiment is similar to the above-mentioned Fig. 9 Embodiments or Fig.10When it is determined that filtering is performed on the boundary of each division unit, the predetermined direction information to which filtering is applied may be encoded / decoded.
[0193] Referring to Table 5, information about whether filtering is performed on a boundary of at least one of left, right, up, or down directions may be encoded / decoded. When a boundary of a specific direction among the boundaries of the division unit coincides with a boundary of the picture, encoding / decoding of information about the corresponding direction may be omitted.
[0194] In the present embodiment, a flag is used to determine whether filtering is performed on a boundary in a specific direction, and a flag can be used to determine whether filtering is performed in units of beams in certain directions (e.g., left+right, up+down, left+right+up, etc.).
[0195]
Table 5
[0196]
[0197] refer to Fig.11 , the left figure shows the case where filtering is performed on the boundary of the division unit (X) in the omnidirectional direction. The middle figure shows the case where filtering is performed only on the left and right boundaries of the division unit (X), and the right figure shows the case where filtering is not performed on the boundary of the division unit (X).
[0198] Fig.12 and Fig.13 A method of determining whether to perform filtering on a boundary of a current division unit based on a flag for an adjacent division unit is shown.
[0199] This embodiment can be used in conjunction with the above Fig.10 That is, whether filtering is performed on the boundary of the current split unit may be determined by further considering the flag for the adjacent split unit in addition to the flag for the current split unit. When the boundary of the current split unit is a vertical boundary, the adjacent split unit may mean a split unit adjacent to the left or right side of the current split unit. When the boundary of the current split unit is a horizontal boundary, the adjacent split unit may mean a split unit adjacent to the top or bottom of the current split unit.
[0200] refer to Fig.12 , assuming that filtering is performed on the boundary of the division units X and Y. Since it is determined that filtering is performed on the boundary where X and Y touch each other, filtering can be performed on the right boundary of the division unit X (ie, the left boundary of the division unit Y).
[0201] refer to Fig.13, this is a case where it is determined that filtering is not performed on only one of the division units X and Y. That is, since the flag (loop_filter_across_enabled_flag) for the division unit X is 1, filtering can be performed on the boundary of the division unit X. On the other hand, since the flag (loop_filter_across_enabled_flag) for the division unit Y is 0, filtering is not performed on the boundary of the division unit Y.
[0202] One of the reasons for performing filtering between division units is to reduce degradation between division units caused by separate encoding / decoding between division units.
[0203] Therefore, as in the above-described embodiment, filtering may be performed on the boundary of one of the adjacent divided regions and filtering may not be performed on the boundary of the other divided region.
[0204] Alternatively, if applying filtering only to a boundary of one of the divided regions may be ineffective in removing image quality degradation, it may be determined not to perform filtering on the boundary.
[0205] For example, when the value of the flag for the division unit X and the value of the flag for the division unit Y are different from each other, filtering may be performed on the boundary between the division units X and Y, or it may be determined that filtering is allowed.
[0206] For example, it is assumed that the left boundary of the current block coincides with the left 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 0, if the flag for the left partition unit adjacent to the current partition unit is 1, filtering can be performed on the left boundary of the current block.
[0207] Similarly, it is assumed that the upper boundary of the current block overlaps 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 0, if the flag for the upper partition unit adjacent to the current partition unit is 1, filtering can be performed on the upper boundary of the current block.
[0208] Alternatively, when the values of the flag for the division unit X and the flag for the division unit Y are different from each other, it may be determined that filtering is not performed on the boundary between the division units X and Y or filtering is not allowed on the boundary between the division units X and Y.
[0209] For example, it is assumed that the left boundary of the current block coincides with the left 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 left partition unit adjacent to the current partition unit is 0, filtering may not be performed at the left boundary of the current block.
[0210] Similarly, it is assumed 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.
[0211] Fig.14 A case where information indicating whether filtering is performed is generated for each division unit boundary is illustrated.
[0212] refer to Fig.14 , it can be performed whether to perform filtering for each partition boundary line that divides or slices the partition units A to F. If filtering is performed on the C0 boundary, filtering can be performed on the A and B boundaries, and filtering is performed on the D and E boundaries, otherwise filtering is not performed on the boundary.
[0213] The number or index of C0, C1, R0, etc. can be derived from the partition information or segmentation information of the partition unit. Alternatively, information for explicitly assigning information and indexes about the partition unit boundaries can be generated. As shown in the syntax elements of Table 6 below, information for determining whether to perform filtering at each partition unit boundary (in this example, each column or each row) can be generated based on Num_units_rows and Num_unit_cols.
[0214]
Table 6
[0215]
[0216] Fig.15 Another example of generating information indicating whether filtering is performed for each division unit boundary is shown.
[0217] refer to Fig.15 , it can be determined whether to perform filtering on each division boundary line that divides or splits the division units A to F. Fig.14 The difference of the embodiment is that the relevant information is generated for each partition unit boundary, rather than for a column or a row across the picture.
[0218] If filtering is performed on the L0 boundary, filtering may be performed on the A and B boundaries, otherwise, filtering may not be performed on the boundaries.
[0219] The number or index of C0, C1, R0, etc. can be derived from the partition information or segmentation information of the partition unit. Alternatively, information for explicitly assigning information and indexes about the partition unit boundary 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.
[0220]
Table 7
[0221]
[0222] Fig.16 A method of applying a deblocking filter according to the present disclosure is illustrated.
[0223] refer to Fig.16 , a block boundary (hereinafter, referred to as an edge) for deblocking filtering among block boundaries of a reconstructed picture can be specified (S1600).
[0224] The reconstructed picture may be divided into a predetermined NxM sample grid. The NxM sample grid may represent a unit in which deblocking filtering is performed. Here, N and M may be integers of 4, 8, 16 or more. Each pixel grid may be defined for each component type. For example, when the component type is a luminance component, N and M may be set to 4, and when the component type is a chrominance difference component, N and M may be set to 8. Regardless of the component type, a fixed grid of size NxM pixels may be used.
[0225] An edge is a block boundary located on an NxM sample 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.
[0226] refer to Fig.16 , a decision value for a specified edge may be derived (S1610).
[0227] In this embodiment, it is assumed that the edge type is a vertical edge and a 4x4 sample grid is applied. Based on the edge, the left block and the right block will be referred to as a P block and a Q block, respectively. The P block and the Q block are pre-reconstructed blocks, the Q block refers to the area currently undergoing deblocking filtering, and the P block may refer to a block that is spatially adjacent to the Q block.
[0228] First, a variable dSam for introducing a decision value may be used to derive a decision value. The variable dSam may be derived for at least one of the first pixel row or the fourth pixel row of the P block and the Q block. Hereinafter, the dSam of the first pixel row (row) of the P block and the Q block is referred to as dSam0, and the dSam of the fourth pixel row (row) is referred to as dSam3.
[0229] When at least one of the following conditions is satisfied, dSam0 may be set to 1, otherwise, dSam0 may be set to 0.
[0230]
Table 8
[0231]
[0232] In Table 8, dpq can be derived based on at least one of the first pixel value linearity d1 of the first pixel row of the P block or the second pixel value linearity d2 of the first pixel row of the Q block. Here, the first pixel value linearity d1 can be derived using i pixels p belonging to the first pixel row of the P block. i can be 3, 4, 5, 6, 7 or more. The i pixels p can be continuous pixels adjacent to each other, or can be non-continuous pixels separated by a predetermined interval. In this case, the pixel p can be the i pixels closest to the edge of the pixels in the first pixel row. Similarly, the second pixel value linearity d2 can be derived using j pixels q belonging to the first pixel row 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 value different from i. The j pixels q can be adjacent continuous pixels, or can be non-continuous pixels separated by a predetermined interval. In this case, the pixel q can be the j pixels closest to the edge of the pixels in the first pixel row.
[0233] 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 may be derived as in the following Equation 1.
[0234] [Equation 1]
[0235] d1=Abs(p2,0-2*p1,0+p0,0)
[0236] d2=Abs(q2,0-2*q1,0+q0,0)
[0237] Alternatively, when six pixels p and six pixels q are used, the first pixel value linearity d1 and the second pixel value linearity d2 may be derived as in the following Equation 2.
[0238] [Equation 2]
[0239] d1=(Abs(p2,0-2*p1,0+p0,0)+Abs(p5,0-2*p4,0+p3,0)+1)>>1
[0240] d2=(Abs(q2,0-2*q1,0+q0,0)+Abs(q5,0-2*q4,0+q3,0)+1)>>1
[0241] In Table 8, sp may represent the first pixel value gradient v1 of the first pixel row of block P, and sq may represent the second pixel value gradient v2 of the first pixel row of block Q. Here, the first pixel value gradient v1 may be derived using m pixels p belonging to the first pixel row of block P. m may be 2, 3, 4, 5, 6, 7 or more. The m pixels p may be continuous pixels adjacent to each other, or may be non-continuous pixels separated by a predetermined interval. Alternatively, some of the m pixels p may be continuous pixels adjacent to each other, while others may be non-continuous pixels separated by a predetermined interval. Similarly, the second pixel value gradient v2 may be derived using n pixels q belonging to the first pixel row of block Q. Then 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 also be a value different from m. The n pixels q may be continuous pixels adjacent to each other, or may be non-continuous pixels separated by a predetermined interval. Alternatively, some of the n pixels q may be continuous pixels adjacent to each other, while others may be non-continuous pixels separated by a predetermined interval.
[0242] For example, when two pixels p and two pixels q are used, the first pixel value gradient v1 and the second pixel value gradient v2 may be derived as in Equation 3 below.
[0243] [Equation 3]
[0244] v1=Abs(p3,0-p0,0)
[0245] v2=Abs(q0,0-q3,0)
[0246] Alternatively, when six pixels p and six pixels q are used, the first pixel value gradient v1 and the second pixel value gradient v2 may be derived as in Equation 4 below.
[0247] [Equation 4]
[0248] v1=Abs(p3,0-p0,0)+Abs(p7,0-p6,0-p5,0+p4,0)
[0249] v2=Abs(q0,0-q3,0)+Abs(q4,0-q5,0-q6,0+q7,0)
[0250] spq in Table 8 can be derived from the difference between the pixel p0,0 and the pixel q0,0 adjacent to the edge.
[0251] The first threshold and the second threshold of Table 8 can be derived based on a predetermined parameter QP. Here, the QP can be determined using at least one of the first quantization parameter of the P block, the second quantization parameter of the Q block, or an offset for introducing the QP. The offset may be a value encoded and signaled by the encoding device. For example, the QP can be derived by adding the offset to the average of the first quantization parameter and the second quantization parameter. The third threshold of Table 8 can be derived based on the above-mentioned quantization parameter (QP) and the block boundary strength (BS). Here, the BS can be variably determined in consideration of the prediction mode of the P / Q block, the inter-frame prediction mode, the presence or absence of non-zero transform coefficients, the difference in motion vectors, etc.
[0252] For example, when at least one prediction mode of the P block and the Q block is an intra mode, the BS may be set to 2. When at least one of the P block or the Q block is encoded in a combined prediction mode, the BS may be set to 2. When at least one of the P block or the Q block includes a non-zero transform coefficient, the BS may be set to 1. When the P block is decoded in an inter prediction mode different from that of the Q block (for example, when the P block is decoded in the current picture reference mode and the Q block is decoded in the merge mode or the AMVP mode), the BS may be set to 1. When the P block and the Q block are decoded in the current picture reference mode and the difference between their block vectors is greater than or equal to a predetermined threshold difference, the BS may be set to 1. Here, the threshold difference may be a fixed value (for example, 4, 8, 16) submitted in advance to the encoding / decoding device.
[0253] Since dSam3 is derived using one or more pixels belonging to the fourth pixel row by the same method as the above-mentioned dSam0, a detailed description will be omitted.
[0254] The decision value may be derived based on the derived dSam0 and dSam3. For example, when both dSam0 and dSam3 are 1, the decision value may be set to a first value (eg, 3), otherwise the decision value may be set to a second value (eg, 1 or 2).
[0255] refer to Fig.16 , a filter type of a deblocking filter may be determined based on the derived decision value (S1620).
[0256] In the encoding / decoding device, multiple filter types with different filter lengths can be defined. As examples of filter types, there can be a long filter with the longest filter length, a short filter with the shortest filter length, or one or more medium filters that are longer than the short filter and shorter than the long filter. The number of filter types defined in the encoding / decoding device can be 2, 3, 4 or more.
[0257] For example, when the decision value is a first value, a long filter may be used, and when the decision value is a second value, a short filter may be used. Alternatively, when the decision value is a first value, one of a long filter or a medium filter may be selectively used, and when the decision value is a second value, a short filter may be used. Alternatively, when the decision value is a first value, a long filter is used, and when the decision value is not a first value, a short filter or a medium filter may be selectively used. Specifically, when the decision value is 2, a medium filter may be used, and when the decision value is 1, a short filter may be used.
[0258] refer to Fig.16 , filtering may be performed on the edge of the reconstructed picture based on a deblocking filter according to the determined filter type ( S1630 ).
[0259] The deblocking filter can be applied to multiple pixels located in both directions based on the edge and in the same pixel row. Here, the multiple pixels to which the deblocking filter is applied are referred to as a filter area, and the length (or number of pixels) of the filter area may be different for each filter type. The length of the filter area may be interpreted as having the same meaning as the filter length of the above-mentioned filter type. Alternatively, the length of the filter area may refer to the sum of the number of pixels to which the deblocking filter is applied in the P block and the number of pixels to which the deblocking filter is applied in the Q block.
[0260] In this embodiment, it is assumed that three filter types, i.e., long filter, medium filter and short filter, are defined in the encoding / decoding device, and the deblocking filtering method for each filter type will be described. However, the present disclosure is not limited thereto, and only long filter and medium filter may be defined, only long filter and short filter may be defined, or only medium filter and short filter may be defined.
[0261] 1. In the case of long filter-based deblocking filtering
[0262] For ease of explanation, it is assumed that the edge type is a vertical edge and the pixel currently being filtered (hereinafter, current pixel q) belongs to block Q, unless otherwise specified. The filtered pixel fq may be derived by weighted averaging of the first reference value and the second reference value.
[0263] Here, all or part of the pixels in the filtering area to which the current pixel q belongs can be used to derive the first reference value. Here, the length (or number of pixels) of the filtering area can be an integer of 8, 10, 12, 14 or more. Some pixels in the filtering area may belong to the P block, and other pixels may belong to the Q block. For example, when the length of the filtering area is 10, 5 pixels may belong to the P block and 5 pixels may belong to the Q block. Alternatively, 3 pixels may belong to the P block and 7 pixels may belong to the Q block. Conversely, 7 pixels may belong to the P block and 3 pixels may belong to the Q block. In other words, long filter-based deblocking filtering can be performed symmetrically or asymmetrically on the P block and the Q block.
[0264] Regardless of the position of the current pixel q, all pixels belonging to the same filtering area can share one and the same first reference value. That is, regardless of whether the current filtered pixel is located in a P block or a Q block, the same first reference value can be used. Regardless of the position of the current filtered pixel in a P block or a Q block, the same first reference value can be used.
[0265] The second reference value may be derived using at least one of the pixels of the filter area belonging to the Q block that are farthest from the edge (hereinafter referred to as the first pixel) or the neighboring pixels of the filter area. The neighboring pixel may refer to at least one pixel adjacent to the right direction of the filter area. For example, the second reference value may be derived as an average value between one first pixel and one neighboring pixel. Alternatively, the second reference value may be derived as an average value between two or more first pixels and two or more neighboring pixels adjacent to the right side of the filter area.
[0266] For weighted averaging, predetermined weights fl 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 the weight f1 may be set by selectively using any one of the plurality of weight sets. The selection may be performed in consideration of the length (or number of pixels) of the filtering area belonging to the Q block. For example, the encoding / decoding device may define a weight set as shown in Table 9 below. Each weight set may consist of one or more weights corresponding to each position of the pixel to be filtered. Therefore, the weight corresponding to the position of the current pixel q may be selected from the plurality of weights belonging to the selected weight set and applied to the current pixel q. The number of weights constituting the weight set may be the same as the length of the filtering area belonging to the Q block. The plurality of weights constituting a weight set may be sampled at predetermined intervals within an integer range greater than 0 and less than 64. Here, 64 is just an example, and may be greater than or less than 64. The predetermined interval may be 9, 13, 17, 21, 25 or more. The interval may be variably determined according to the length L of the filtering area included in the Q block. Alternatively, a fixed spacing may be used regardless of L.
[0267]
Table 9
[0268] Length of the filter region belonging to the Q block (L) Weight Set L>5 {59,50,41,32,23,14,5} 5 {58,45,32,19,6} L<5 {53,32,11}
[0269] Referring to Table 9, when the length (L) of the filter area belonging to the Q block is greater than 5, {59, 50, 41, 32, 23, 14, 5} may be selected from three weight sets, 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 apparatus may be 2, 4, or more.
[0270] In addition, when L is 7 and the current pixel is the first edge-based pixel q0, a weight of 59 may be applied to the current pixel. When the current pixel is the second edge-based pixel q1, a weight of 50 may be applied to the current pixel, and when the current pixel is the seventh edge-based pixel q6, a weight of 5 may be applied to the current pixel.
[0271] The weight f2 may be determined based on a predetermined weight fl. For example, the weight f2 may be determined as a value obtained by subtracting the weight f1 from a predefined constant. Here, the predefined constant is a fixed value predefined in the encoding / decoding device and may be 64. However, this is only an example, and an integer greater than or less than 64 may be used.
[0272] 2. In the case of deblocking filtering based on the median filter
[0273] The filter length of the medium 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 medium filter may be smaller than the length of the filtering area according to the aforementioned long filter.
[0274] For example, the length of the filter area according to the filter may be 6, 8 or more. Here, the length of the filter area belonging to the P block may be the same as the length of the filter area belonging to the Q block. However, the present invention is not limited thereto, and the length of the filter area belonging to the P block may be longer or shorter than the length of the filter area belonging to the Q block.
[0275] Specifically, the filtered pixel fq may be derived using the current pixel q and at least one neighboring pixel adjacent to the current pixel q. Here, the neighboring pixel may include at least one of one or more pixels adjacent to the left side of the current pixel q (hereinafter, left peripheral pixels) or one or more pixels adjacent to the right side of the current pixel q (hereinafter, right peripheral pixels).
[0276] For example, when the current pixel q is q0, two left neighboring pixels p0 and p1 and two right neighboring pixels q1 and q2 can be used. When the current pixel q is q1, two left neighboring pixels p0 and q0 and one right neighboring pixel q2 can be used. When the current pixel q is q2, three left neighboring pixels p0, q0 and q1 and one right neighboring pixel q3 can be used.
[0277] 3. Deblocking filtering based on short filter
[0278] The filter length of the short filter may be smaller than the filter length of the medium filter. The length (or number of pixels) of the filter area according to the short filter may be smaller than the length of the filter area according to the above-mentioned medium filter. For example, the length of the filter area according to the short filter may be 2, 4 or more.
[0279] Specifically, the filtered pixel fq can be derived by adding or subtracting a predetermined first offset (offset1) from the current pixel q. Here, the first offset can be determined based on the difference between the pixel of the P block and the pixel of the Q block. For example, as shown in the following equation 5, the first offset can be determined based on the difference between the pixel p0 and the pixel q0 and the difference between the pixel p1 and the pixel q1. However, filtering of the current pixel q can be performed only when the first offset is less than a predetermined threshold. Here, the threshold is derived based on the above-mentioned quantization parameter (QP) and the block boundary strength (BS), and its detailed description will be omitted.
[0280] [Equation 5]
[0281] offset1=(9*(q0-p0)-3*(q1-p1)+8)>>4
[0282] Alternatively, the filtered pixel fq may be derived by adding a predetermined second offset (offset2) to the current pixel q. Here, the second offset may be determined by considering at least one of the difference (or amount of change) between the current pixel q and the adjacent pixel or the first offset. Here, the adjacent pixel 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 Equation 6 below.
[0283] [Equation 6]
[0284] offset2=(((q2+q0+1)>>1)-q1-offset1)>>1
[0285] The above-described filtering method is not limited to application only to a deblocking filter, and may be similarly or similarly applied to an adaptive sampling offset (SAO), an adaptive loop filter (ALF), etc., which are examples of a loop filter.
[0286] For the sake of clarity of explanation, the exemplary methods of the present disclosure are expressed as a series of operations, but this is not intended to limit the order in which the steps are performed, and each step can be performed simultaneously or in a different order if necessary. To implement the methods according to the present disclosure, the exemplary steps may include additional steps, may include other steps in addition to some steps, or may include additional other steps in addition to some steps.
[0287] The various embodiments of the present disclosure are not intended to list all possible combinations but to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied alone or in combination of two or more.
[0288] In addition, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. For implementation by hardware, 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), and their general purpose may be implemented by processors (general purpose processors), controllers, microcontrollers, microprocessors, etc.
[0289] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that enable operations of methods according to various embodiments to be performed on a device or computer, and / or non-transitory computer-readable media that stores such software or instructions, etc. and can be executed on a device or computer.
[0290] Industrial Applications
[0291] The present invention can be used for encoding / decoding video signals.
Claims
1. A method for decoding an image performed by an image decoding device, comprising: Get the reconstructed image of the current image; determining whether to perform filtering on a boundary of a current partition unit based on a predetermined flag, the current partition unit being one of a plurality of partition units belonging to the current picture; as well as performing filtering on the boundary of the current partition unit in response to the determining, wherein each of the partition units comprises at least one of a sub-picture, a slice, or a tile, wherein the flag includes at least one of a first flag indicating whether filtering is performed on a boundary of the partition unit within the current picture or a second flag indicating whether filtering is performed on the boundary of the current partition unit, Whether filtering is performed on a boundary of the current division unit is determined by further considering a third flag indicating whether filtering is performed on a boundary of an adjacent division unit adjacent to the current division unit, Wherein, when the first flag is a first value, a restriction is made so that filtering is not performed on the boundary of the division unit in the current picture, and when the first flag is a second value, the restriction is not applied on the boundary of the division unit in the current picture, and The adjacent division unit is determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.
2. The method according to claim 1, wherein: Performing the filtering includes: Specify block boundaries for deblocking filtering; deriving a decision value for the block boundary; Determining a filter type for the deblocking filter based on the decision value; and The filtering is performed on the block boundary based on the filter type.
3. A method for encoding an image performed by an image encoding device, comprising: Get the reconstructed image of the current image; determining and encoding whether filtering is performed on a boundary of a current partition unit, the current partition unit being one of a plurality of partition units belonging to the current picture; as well as performing filtering on the boundary of the current partition unit in response to the determining, wherein each of the partition units comprises at least one of a sub-picture, a slice, or a tile, Wherein, the determining and encoding whether to perform filtering on the boundary of the current partition unit includes: encoding at least one of a first flag indicating whether filtering is performed on a boundary of a partition unit within the current picture or a second flag indicating whether filtering is performed on the boundary of the current partition unit, Whether filtering is performed on a boundary of the current division unit is determined by further considering a third flag indicating whether filtering is performed on a boundary of an adjacent division unit adjacent to the current division unit, Wherein, when the first flag is a first value, a restriction is made so that filtering is not performed on the boundary of the division unit in the current picture, and when the first flag is a second value, the restriction is not applied on the boundary of the division unit in the current picture, and The adjacent division unit is determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.
4. The method according to claim 3, wherein: Performing the filtering includes: Specify block boundaries for deblocking filtering; deriving a decision value for the block boundary; Determining a filter type for the deblocking filtering based on the decision value; and The filtering is performed on the block boundary based on the filter type.
5. A non-transitory computer-readable storage medium storing a bitstream generated by a method for encoding an image, the method comprising: Get the reconstructed image of the current image; determining and encoding whether filtering is performed on a boundary of a current partition unit, the current partition unit being one of a plurality of partition units belonging to the current picture; as well as performing filtering on the boundary of the current partition unit in response to the determining, wherein each of the partition units comprises at least one of a sub-picture, a slice, or a tile, Wherein, the determining and encoding whether to perform filtering on the boundary of the current partition unit includes: encoding at least one of a first flag indicating whether filtering is performed on a boundary of a partition unit within the current picture or a second flag indicating whether filtering is performed on the boundary of the current partition unit, Whether filtering is performed on a boundary of the current division unit is determined by further considering a third flag indicating whether filtering is performed on a boundary of an adjacent division unit adjacent to the current division unit, Wherein, when the first flag is a first value, a restriction is made so that filtering is not performed on the boundary of the division unit in the current picture, and when the first flag is a second value, the restriction is not applied on the boundary of the division unit in the current picture, and The adjacent division unit is determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.
6. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising: Get the reconstructed image of the current image; determining and encoding whether filtering is performed on a boundary of a current partition unit, the current partition unit being one of a plurality of partition units belonging to the current picture; as well as performing filtering on the boundary of the current partition unit in response to the determining, wherein each of the partition units comprises at least one of a sub-picture, a slice, or a tile, Wherein, the determining and encoding whether to perform filtering on the boundary of the current partition unit includes: encoding at least one of a first flag indicating whether filtering is performed on a boundary of a partition unit within the current picture or a second flag indicating whether filtering is performed on the boundary of the current partition unit, Whether filtering is performed on a boundary of the current division unit is determined by further considering a third flag indicating whether filtering is performed on a boundary of an adjacent division unit adjacent to the current division unit, Wherein, when the first flag is a first value, a restriction is made so that filtering is not performed on the boundary of the division unit in the current picture, and when the first flag is a second value, the restriction is not applied on the boundary of the division unit in the current picture, and The adjacent division unit is determined based on whether the boundary of the current division unit is a vertical boundary or a horizontal boundary.
