Image encoding / decoding method and apparatus based on loop filter
By dividing the image into multiple partitioning units and adaptively performing filtering based on the flags, the problem of encoding/decoding efficiency and image quality improvement in existing technologies is solved, achieving more efficient image processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF IMAGE TECH INC
- Filing Date
- 2020-09-10
- Publication Date
- 2026-06-05
AI Technical Summary
Existing image compression techniques struggle to effectively improve encoding/decoding efficiency and image quality during high-resolution and high-quality image encoding/decoding, especially in the case of insufficiently flexible and efficient filtering at the boundaries of segmentation units.
By dividing an image into multiple partition units and determining whether to perform filtering at the boundaries of the current partition unit based on predetermined flags, including sub-images, slices, or tiles, an adaptive deblocking filter is used to improve encoding/decoding efficiency and image quality.
It improves the efficiency of image encoding/decoding and enhances the quality of reconstructed images through adaptive filtering technology, especially in the more flexible and efficient processing at the boundaries of segmentation units.
Smart Images

Figure CN114424576B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an image encoding / decoding method and apparatus. Background Technology
[0002] Recently, there has been an increasing demand for high-resolution and high-quality images, such as high-definition (HD) and ultra-high-definition (UHD) images, in various application fields, and as a result, efficient image compression technology is being discussed.
[0003] For image compression technology, there are various techniques, such as inter-frame prediction technology that uses image compression to predict the pixel values included in the current image from images before or after the current image, intra-frame prediction technology that uses pixel information in the current image to predict the pixel values included in the current image, and entropy coding technology that assigns short codes to values that occur frequently and long codes to values that occur infrequently. By using such image compression techniques, image data can be effectively compressed, transmitted, or stored. Summary of the Invention
[0004] Technical issues
[0005] The purpose of this invention is to provide a method and apparatus for dividing an image into predetermined partitioning units.
[0006] The purpose of this invention is to provide a method and apparatus for adaptively performing filtering on the boundaries of partitioned units.
[0007] The purpose of this invention is to provide a method and apparatus for applying an improved deblocking filter.
[0008] Technical solution
[0009] The video decoding method and apparatus according to the present invention can divide an image into multiple partitioning units, determine whether to perform filtering on the boundary of the current partitioning unit based on a predetermined flag, and perform filtering on the boundary of the current partitioning unit in response to the determination.
[0010] In the video decoding method and apparatus according to the present invention, the partitioning unit may include at least one of sub-image, slice, or tile.
[0011] In the video decoding method and apparatus according to 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 a segmentation unit within an image, or a second flag indicating whether filtering is performed on the boundary of the current segmentation unit in the image.
[0012] In the video decoding method and apparatus according to the present invention, when the first flag is a first value, filtering can be performed without restriction on the boundaries of the division units within the image, and when the first flag is a second value, the restriction can be removed from the boundaries of the division units within the image.
[0013] In the video decoding method and apparatus according to the present invention, when the second flag is a first value, filtering can be restricted 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 allowed to be performed on the boundary of the current partition unit.
[0014] In the video decoding method and apparatus according to the present invention, the second flag may be decoded only if the restriction that filtering is not performed on the boundary of the segmentation unit not within the image is not applied according to the first flag.
[0015] In the video decoding method and apparatus according to the present invention, whether to perform filtering on the boundary of the current partition unit can 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.
[0016] In the video decoding method and apparatus according to the present invention, the position of adjacent partitioning units can be determined based on whether the boundary of the current partitioning unit is a vertical boundary or a horizontal boundary.
[0017] In the video decoding method and apparatus according to the present invention, the step of performing filtering may include: specifying the block boundary of deblocking filtering, deriving decision values for the block boundary, determining the filtering type of deblocking filtering based on the decision values, and performing filtering on the block boundary based on the filtering type.
[0018] The video encoding method and apparatus according to the present invention can divide an image into multiple partitioning units, determine whether to perform filtering on the boundary of the current partitioning unit, and in response to determining whether to perform filtering on the boundary of the current partitioning unit.
[0019] In the video encoding method and apparatus according to the present invention, the partitioning unit may include at least one of sub-pictures, slices, or tiled slices.
[0020] In the video encoding method and apparatus 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 to perform filtering on the boundary of a partition unit within an image or a second flag indicating whether to perform filtering on the boundary of the current partition unit in the image.
[0021] In the video encoding method and apparatus according to the present invention, when it is determined that filtering is restricted and therefore not performed on the boundaries of the partitioning units within the image, a first flag can be encoded as a first value, and when it is determined that the restriction is not applied on the boundaries of the partitioning units within the image, the first flag can be encoded as a second value.
[0022] In the video encoding method and apparatus according to the present invention, when it is determined that filtering is restricted and therefore not performed on the boundary of the current partition unit, the second flag can be encoded as the 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 the second value.
[0023] In the video encoding method and apparatus according to the present invention, the second flag may be encoded only when there is no restriction that filtering is performed on the boundaries of the partitioning units that are not within the same image.
[0024] In the video coding method and apparatus according to the present invention, whether to perform filtering on the boundary of the current partition unit can 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.
[0025] In the video encoding method and apparatus according to the present invention, the position of adjacent partitioning units can be determined based on whether the boundary of the current partitioning unit is a vertical boundary or a horizontal boundary.
[0026] In the video encoding method and apparatus according to the present invention, the step of performing filtering may include: specifying block boundaries for deblocking filtering, deriving decision values for the block boundaries, determining the filtering type for deblocking filtering based on the decision values, and performing filtering on the block boundaries based on the filtering type.
[0027] Beneficial effects
[0028] According to the present invention, encoding / decoding efficiency can be improved by dividing an image into various partitioning units.
[0029] According to the present invention, encoding / decoding efficiency can be improved by adaptively performing filtering at the boundaries of the partitioning units.
[0030] According to the present invention, image quality can be improved by applying an improved deblocking filter to the reconstructed image. Attached Figure Description
[0031] Figure 1 This is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
[0032] Figure 2 This is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
[0033] Figures 3 to 6 The illustration shows a method for dividing an image into one or more partition units according to the present disclosure.
[0034] Figure 7 The illustration shows a method for performing filtering based on predetermined flags according to the present disclosure.
[0035] Figures 8 to 15 The illustration shows a method according to the present disclosure for determining whether to perform filtering on the boundaries of partitioned units based on one or more flags.
[0036] Figure 16 The illustration shows a method for applying a deblocking filter according to the present disclosure. Detailed Implementation
[0037] The image decoding method and apparatus of the present invention can divide an image into multiple partitioning units, determine whether to perform filtering on the boundary of the current partitioning unit based on a predetermined flag, and perform filtering on the boundary of the current partitioning unit in response to the determination.
[0038] In the image decoding method and apparatus of the present invention, the segmentation unit may include at least one of sub-image, slice, or tile.
[0039] In the image decoding method and apparatus 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 a segmentation unit within an image, or a second flag indicating whether filtering is performed on the boundary of the current segmentation unit in the image.
[0040] In the image decoding method and apparatus of the present invention, when the first flag is a first value, filtering can be performed without restriction on the boundaries of the partitioning units within the image, and when the first flag is a second value, the restriction can be removed from the boundaries of the partitioning units within the image.
[0041] In the image decoding method and apparatus of the present invention, when the second flag is a first value, filtering can be restricted so that filtering is not performed on the boundary of the current partitioning unit, and when the second flag is a second value, filtering can be performed on the boundary of the current partitioning unit.
[0042] In the image decoding method and apparatus of the present invention, the second flag may be decoded only if the restriction that filtering is not performed on the boundary of the segmentation unit not within the image is not applied according to the first flag.
[0043] In the image decoding method and apparatus of the present invention, whether to perform filtering on the boundary of the current partition unit can 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.
[0044] In the image decoding method and apparatus of the present invention, the position of adjacent partitioning units can be determined based on whether the boundary of the current partitioning unit is a vertical boundary or a horizontal boundary.
[0045] In the image decoding method and apparatus of the present invention, performing filtering may include: specifying the block boundary for deblocking filtering, deriving decision values for the block boundary, determining the filtering type for deblocking filtering based on the decision values, and performing filtering on the block boundary based on the filtering type.
[0046] The image encoding method and apparatus of the present invention can divide an image into multiple partitioning units, determine whether to perform filtering on the boundary of the current partitioning unit, and respond to determining whether to perform filtering on the boundary of the current partitioning unit.
[0047] In the image encoding method and apparatus of the present invention, the segmentation unit may include at least one of sub-images, slices, or tiled slices.
[0048] In the image encoding method and apparatus 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 to perform filtering on the boundary of a partition unit within an image or a second flag indicating whether to perform filtering on the boundary of the current partition unit in the image.
[0049] In the image encoding method and apparatus of the present invention, when it is determined that filtering is restricted and therefore not performed on the boundary of a partition unit within an image, a first flag can be encoded as a first value, and when it is determined that the restriction is not applied on the boundary of a partition unit within an image, the first flag can be encoded as a second value.
[0050] In the image encoding method and apparatus of the present invention, when it is determined that filtering is restricted and therefore not performed on the boundary of the current partition unit, the second flag can be encoded as the 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 the second value.
[0051] In the image encoding method and apparatus of the present invention, the second flag can be encoded only when there is no restriction that filtering is performed on the boundaries of the partitioning units that are not within the image.
[0052] In the image encoding method and apparatus of the present invention, whether to perform filtering on the boundary of the current partition unit can 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.
[0053] In the image encoding method and apparatus of the present invention, the position of adjacent partitioning units can be determined based on whether the boundary of the current partitioning unit is a vertical boundary or a horizontal boundary.
[0054] In the image encoding method and apparatus 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 for deblocking filtering based on the decision values, and performing filtering on the block boundaries based on the filtering type.
[0055] Various modifications and embodiments are possible in this invention, and specific embodiments will be illustrated in the accompanying drawings and described in detail in the detailed description. However, this is not intended to limit the invention to the specific embodiments, but should be understood to include all variations, equivalents, and substitutions within the spirit and scope of the invention. In describing each drawing, similar reference numerals are used for similar elements.
[0056] Terms such as "first" and "second" may be used to describe various components, but the components should not be limited by these terms. These terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the invention, a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component. The term and / or includes a combination of or any one of the several related listed items.
[0057] When a component is referred to as "connected" or "connected to" another component, it can be directly connected or linked to another component, but it should be understood that other components may exist in between. On the other hand, when a component is referred to as "directly connected" or "directly linked to" another component, it should be understood that there are no other components in between.
[0058] The terminology used in this application is for describing specific embodiments only and is not intended to limit the invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, terms such as “comprising” or “having” are intended to indicate the presence of features, quantities, steps, actions, components, parts, or combinations thereof described in the specification, rather than one or more other features. It should be understood that the presence or addition of elements or quantities, steps, actions, components, parts, or combinations thereof is not pre-excluded.
[0059] The preferred embodiments of the invention will now be described in more detail with reference to the accompanying drawings. In the following description, the same reference numerals are used for the same elements in the drawings, and repeated descriptions of the same elements are omitted.
[0060] Figure 1 This is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
[0061] refer to Figure 1 The image encoding device 100 may include an image segmentation unit 110, a prediction unit 120, 125, a transformation unit 130, a quantization unit 135, a reordering unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse transformation unit 145, a filter unit 150, and a memory 155.
[0062] Figure 1 Each component shown is illustrated independently to represent a different functional feature in the image encoding apparatus, and does not imply 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 constituent part, at least two constituent parts of each constituent part are combined to form a constituent part, or a constituent part may be divided into multiple constituent parts to perform functions. Integrated and separate embodiments of components are also included within the scope of this invention unless departing from its spirit.
[0063] Furthermore, some components may not be essential components for performing the basic functions of this invention, but may be optional components used only to improve performance. This invention can be implemented by including only the essential components for realizing the essence of the invention, excluding components used for performance improvement, and structures that include only the essential components and excluding optional components used for performance improvement can also be included within the scope of this invention.
[0064] Image partitioning unit 110 can partition the input image into at least one processing unit. In this case, the processing unit can be a prediction unit (PU), a transformation unit (TU), or a decoding unit (CU). Image partitioning unit 110 can encode the image by dividing it into a combination of multiple decoding units, prediction units, and transformation units and selecting the combination of decoding units, prediction units, and transformation units based on a predetermined criterion (e.g., a cost function).
[0065] For example, an image can be divided into multiple decoding units. To segment the decoding units in an image, a recursive tree structure such as a quadtree can be used. The root decoding unit, which is the largest decoding unit in an image that has been segmented into other decoding units, can be divided into as many child nodes as there are decoding units in the image. Decoding units that are no longer segmented according to certain constraints become leaf nodes. That is, when it is assumed that a decoding unit can only be segmented into squares, a decoding unit can be segmented into up to four different decoding units.
[0066] In the following, in embodiments of the present invention, the decoding unit may be used to mean either a unit that performs encoding or a unit that performs decoding.
[0067] A prediction cell can be obtained by dividing a decoding cell into at least one square or non-square shape of the same size. A decoding cell can be divided such that one prediction cell in the prediction cell has a different shape and / or size than another prediction cell.
[0068] When the prediction unit for intra-frame prediction based on the decoding unit is not the smallest decoding unit, intra-frame prediction can be performed without dividing it into multiple NxN prediction units.
[0069] Prediction units 120 and 125 may include an inter-frame prediction unit 120 performing inter-frame prediction and an intra-frame prediction unit 125 performing intra-frame prediction. It can be determined whether inter-frame prediction or intra-frame prediction is used for the prediction unit, and specific information based on each prediction method (e.g., intra-frame prediction mode, motion vectors, reference image, etc.) can be determined. In this case, the processing unit performing the prediction may be different from the processing unit that determines the prediction method and specific content. For example, the prediction method and prediction mode are determined in the prediction unit, and the prediction can be performed in the transform unit. The residual value (residual block) between the generated prediction block and the original block can be input to the transform unit 130. Additionally, prediction mode information, motion vector information, etc., used for prediction can be encoded by the entropy coding unit 165 along with the residual value and transmitted to the decoder. When using a specific coding mode, the original block can be encoded as is and sent to the decoder without generating a prediction block through prediction units 120 and 125.
[0070] The inter-frame prediction unit 120 can predict prediction units based on information from at least one of the previous or subsequent images of the current image, and in some cases, based on information from regions in the current image that have already been encoded. The inter-frame prediction unit 120 may include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.
[0071] The reference image interpolation unit can receive reference image information from memory 155 and generate integer pixel or smaller pixel information in the reference image. In the case of luminance pixels, an 8-tap DCT-based interpolation filter with different filter coefficients can be used to generate integer pixel or smaller pixel information in 1 / 4 pixel units. In the case of chrominance signals, a 4-tap DCT-based interpolation filter with different filter coefficients can be used to generate integer pixel or smaller pixel information in 1 / 8 pixel units.
[0072] The motion prediction unit can perform motion prediction based on a reference image interpolated by a reference image interpolation unit. Various methods can be used to compute motion vectors, such as Full Search-based Block Matching (FBMA), Three-Step Search (TSS), and New Three-Step Search (NTS). Motion vectors, based on interpolated pixels, can have motion vector values in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various methods, such as skipping methods, merging methods, AMVP (Advanced Motion Vector Prediction) methods, and intra-block copying methods, can be used as motion prediction methods.
[0073] Intra-prediction unit 125 can generate prediction units based on reference pixel information surrounding the current block, which serves as pixel information in the current image. When the neighboring block of the current prediction unit is a block performing inter-prediction and the reference pixel is a pixel performing inter-prediction, the reference pixel included in the block performing inter-prediction can be used by replacing it with the reference pixel information of the surrounding block performing intra-prediction. That is, when the reference pixel is unavailable, the unavailable reference pixel information can be used by replacing it with at least one of the available reference pixels.
[0074] In intra-frame prediction, the prediction mode can have a directional prediction mode that uses reference pixel information based on the prediction direction and a non-directional mode that does not use directional information when performing prediction. The mode used to predict luminance information and the mode used to predict chrominance information can be different, and the intra-frame prediction mode information used to predict luminance information or the predicted luminance signal information can be used to predict chrominance information.
[0075] When performing intra-frame prediction, if the size of the prediction unit and the size of the transform unit are the same, intra-frame prediction can be performed based on the pixels to the left, upper left, and above the prediction unit. However, when performing intra-frame prediction, if the size of the prediction unit and the size of the transform unit are different, intra-frame prediction can be performed based on the transform unit using reference pixels. Furthermore, intra-frame prediction using N×N segmentation can be used only for the smallest decoding unit.
[0076] Intra-prediction methods generate prediction blocks based on prediction modes after applying an AIS (Adaptive Intra-Smoothing) filter to a reference pixel. The type of AIS filter applied to the reference pixel may be different. To perform intra-prediction, the intra-prediction mode of the current prediction unit can be predicted from the intra-prediction modes of prediction units existing around it. When predicting the prediction mode of the current prediction unit using mode information predicted from neighboring prediction units, if the intra-prediction modes of the current prediction unit and its neighboring 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 its neighboring prediction units are the same; and if the prediction modes of the current prediction unit and its neighboring prediction units are different, entropy coding can be performed to encode the prediction mode information of the current block.
[0077] Additionally, residual blocks can be generated that include residual information based on the difference between the original block of the prediction unit and the prediction unit generated by prediction units 120 and 125. The generated residual blocks can be input to transformation unit 130.
[0078] Transform unit 130 can transform the residual block, which includes residual information between the prediction units generated by prediction units 120 and 125 and the original block, using transformation methods such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), and KLT. The choice between applying DCT, DST, or KLT to transform the residual block can be determined based on the intra-frame prediction mode information of the prediction units used to generate the residual block.
[0079] The quantization unit 135 can quantize the values transformed to the frequency domain by the transform unit 130. The quantization coefficients can vary depending on the importance of the block or image. The values calculated by the quantization unit 135 can be provided to the inverse quantization unit 140 and the rearrangement unit 160.
[0080] The rearrangement unit 160 can perform rearrangement on the coefficient values used for the quantized residual values.
[0081] The rearrangement unit 160 can transform coefficients from 2D block form to 1D vector form using a coefficient scanning method. For example, the rearrangement unit 160 can transform coefficients from DC coefficients to coefficients in the high-frequency region using a zig-zag scanning method. Depending on the size of the transform unit and the intra-frame prediction mode, a vertical scan of the 2D block form in the column direction and a horizontal scan of the 2D block form in the row direction can be used instead of a zig-zag scan. That is, depending on the size of the transform unit and the intra-frame prediction mode, it can be determined which of the following scan types—zig-zag, vertical, and horizontal—is used.
[0082] Entropy coding unit 165 can perform entropy coding based on the value calculated by rearrangement unit 160. Various coding methods such as Exponential Columbus, CAVLC (Context Adaptive Variable Length Coding), and CABAC (Context Adaptive Binary Arithmetic Coding) can be used for entropy coding.
[0083] The entropy encoder 165 can encode various types of information, such as residual coefficient information, block type information, prediction mode information, partitioning unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information.
[0084] The entropy encoder 165 can entropy encode the coefficient values of the decoding unit input from the rearrangement unit 160.
[0085] Inverse quantization unit 140 and inverse transform unit 145 inverse quantize the value quantized by quantization unit 135 and inverse transform the value transformed by transform unit 130. A reconstructed block can be generated by combining the residual value generated by inverse quantization unit 140 and inverse transform unit 145 with the prediction unit predicted by the motion estimation unit, motion compensation unit, and intra-frame prediction unit included in prediction units 120 and 125.
[0086] The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
[0087] Deblocking filters remove block distortion caused by boundaries between blocks in a reconstructed image. To determine whether to perform deblocking, the number of pixels in a block's columns or rows can be used to decide whether to apply a deblocking filter to the current block. When applying a deblocking filter to a block, a strong or weak filter can be applied depending on the desired deblocking intensity. Furthermore, horizontal and vertical filtering can be processed in parallel when applying a deblocking filter.
[0088] The offset correction unit can correct the offset between the deblocked and original images pixel by pixel. To perform offset correction on a specific image, after classifying the pixels in the image into a certain number of regions and determining the regions where the offset will be applied, the method of applying the offset to a region offset or the method of applying the offset by considering the edge information of each pixel can be used.
[0089] ALF (Adaptive Loop Filter) can be performed based on values obtained by comparing the filtered reconstructed image with the original image. After classifying the pixels in the image into predetermined groups, a filter to be applied to each group can be determined to perform filtering differently for each group. Information related to whether to apply ALF can be transmitted to each decoding unit (CU) of the luminance signal, and the shape and filter coefficients of the ALF filter to be applied can vary according to each block. Furthermore, the same type (fixed type) of ALF filter can be applied regardless of the characteristics of the block to which it is applied.
[0090] The memory 155 can store the reconstructed blocks or images output from the filter unit 150, and can provide the stored reconstructed blocks or images to the prediction units 120 and 125 when performing inter-frame prediction.
[0091] Figure 2 This is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
[0092] refer to Figure 2 The image decoder 200 may include an entropy decoding unit 210, a rearrangement unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, 235, a filter unit 240, and a memory 245.
[0093] When an image bitstream is input from an image encoder, the input bitstream can be decoded in the reverse process of the image encoder.
[0094] The entropy decoding unit 210 can perform entropy decoding in a process that is the reverse of the process performed by entropy encoding in the entropy encoding unit of the image encoder. For example, various methods corresponding to those performed in the image encoder, such as Exponential Columbus (CAVLC), Context Adaptive Variable Length Coding (CAVLC), and Context Adaptive Binary Arithmetic Coding (CABAC), can be applied.
[0095] The entropy decoding unit 210 can decode information related to intra-frame prediction and inter-frame prediction performed by the encoder.
[0096] Rearrangement unit 215 can perform rearrangement on the bitstream entropy decoded by entropy decoding unit 210 based on the rearrangement method of encoding unit. Coefficients in 1D vector form can be rearranged again into coefficients in 2D block form. Rearrangement unit 215 can perform reordering by receiving information related to the coefficient scan performed by encoder and performing a reverse scan based on the scan order performed by corresponding encoder.
[0097] The inverse quantization unit 220 can perform inverse quantization based on the quantization parameters provided by the encoder and the coefficients of the reordered block.
[0098] The inverse transform unit 225 can perform inverse transforms (i.e., inverse DCT, inverse DST, and inverse KLT) corresponding to the transforms (i.e., DCT, DST, and KLT) performed by the transform unit for the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit 225 of the image decoder, transform methods (e.g., DCT, DST, and KLT) can be selectively performed based on multiple pieces of information such as the prediction method, the size of the current block, and the prediction direction.
[0099] Prediction units 230 and 235 can generate prediction blocks based on prediction blocks provided by entropy decoding unit 210 and previously decoded block or image information provided by memory 245.
[0100] As described above, when intra-prediction is performed in the same manner as in an image encoder, and the size of the prediction unit and the transform unit are the same, intra-prediction of the prediction unit can be performed based on the pixels located to the left, top-left, and top of the prediction unit. However, when the size of the prediction unit and the transform unit are different when performing intra-prediction, intra-prediction can be performed based on the transform unit using reference pixels. Furthermore, intra-prediction using an NxN partition can be used only for the smallest decoding unit.
[0101] 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 from the entropy decoding unit 210, such as prediction unit information, prediction mode information of the intra-frame prediction method, and motion prediction-related information of the inter-frame prediction method, classify prediction units 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 of the current prediction unit based on information included in at least one of the previous or subsequent images containing the current image containing the current prediction unit, using information provided by the image encoder required for inter-frame prediction of the current prediction unit. Alternatively, inter-frame prediction may be performed based on information about a previously reconstructed partial region in the current image containing the current prediction unit.
[0102] To perform inter-frame prediction, the motion prediction method for the prediction units included in the decoding unit can be determined in skip mode, merge mode, AMVP mode, and intra-block copy mode.
[0103] Intra-prediction unit 235 can generate prediction blocks based on pixel information in the current image. When the prediction unit is one that has already performed intra-prediction, intra-prediction can be performed based on the intra-prediction mode information of the prediction unit provided by the image encoder. 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 the part that performs filtering on the reference pixels of the current block, and can be applied by determining whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixels of the current block by using the prediction mode provided by the image encoder and the AIS filter information of the prediction unit. 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.
[0104] When the prediction mode of the current prediction unit is a prediction unit that performs intra-frame prediction based on pixel values obtained by interpolating reference pixels, the reference pixel interpolation unit can interpolate reference pixels to generate an integer number of reference pixels or fewer. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating reference pixels, reference pixels can be omitted. When the prediction mode of the current block is DC mode, the DC filter can pass through the filter to generate the prediction block.
[0105] The reconstructed blocks or images can be provided to the filter unit 240. The filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
[0106] The video encoder can provide information about whether to apply a deblocking filter to a corresponding block or image, and whether to apply a strong or weak filter when doing so. The video decoder can then provide information related to the deblocking filter provided by the video encoder, and perform deblocking filtering on the corresponding block.
[0107] The offset correction unit can perform offset correction on the reconstructed image based on the type and offset value information of the offset correction applied to the image during encoding.
[0108] The ALF can be applied to the decoding unit based on information provided by the encoder regarding whether to apply the ALF and the ALF coefficient information. This ALF information can be provided from a specific parameter set.
[0109] The memory 245 can store reconstructed images or blocks so that they can be used as reference images or reference blocks, and can also provide the reconstructed images to the output unit.
[0110] As described above, in the embodiments of the present invention, for ease of description, the decoding unit is used as the encoding unit, but it can be a unit that performs not only encoding but also decoding.
[0111] Figures 3 to 6 A method for dividing an image into one or more partitioning units according to this disclosure is shown.
[0112] An image can be divided into predefined partition units in an encoding / decoding device. Here, the predefined partition units may include at least one of sub-images, slices, tiles, or bricks.
[0113] Specifically, an image can be divided into one or more tile rows or one or more tile columns. In this case, a tile can represent a set of blocks covering a predetermined rectangular area in the image. Here, a block can refer to a decoded tree block (the largest decoded block). Decoded tree blocks belonging to a tile can be scanned based on raster scan order.
[0114] A tile can be divided into one or more tiles. A tile can consist of blocks in rows or columns of the tile. That is, the division of tiles can be performed only in the vertical or horizontal direction. However, the invention is not limited to this, and a tile can be divided into multiple tiles based on one or more vertical lines and one or more horizontal lines. A tile can be a sub-concept of the tile and can be referred to as a sub-tile.
[0115] A slice can include one or more tile slices. Alternatively, a slice can include one or more tiles. Alternatively, a slice can be defined as one or more rows of decoded tree blocks (CTU rows) within a tile slice. Alternatively, a slice can be defined as one or more columns of decoded tree blocks (CTU columns) within a tile slice. That is, a tile slice can be set as a slice, and a tile slice can consist of multiple slices. When a tile slice is divided into multiple slices, the division can 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 slice, but the horizontal boundary of the slice is different from the horizontal boundary of the tile slice, and may instead coincide with the horizontal boundary of the decoded tree blocks in the tile slice. On the other hand, the division can be restricted to be performed only in the vertical direction.
[0116] The encoding / decoding device can define multiple segmentation modes for a slice. For example, the segmentation mode can include at least one of a raster scan mode and a rectangular slice mode. In the case of raster scan mode, a slice may include a series of tiles (or blocks, patches) according to the raster scan order. In the case of rectangular slice mode, a slice may include multiple tiles forming a rectangular region, or may include one or more row (or column) decoder tree blocks from a tile forming a rectangular region.
[0117] Information regarding the segmentation pattern of a slice can be explicitly encoded by the encoding device and sent to the decoding device via a signal, or it can be implicitly determined by the encoding / decoding device. For example, a flag indicating whether it is a rectangular slice pattern can be sent via a signal. When the flag is a first value, a raster scan pattern can be used, and when the flag is a second value, a rectangular slice pattern can be used. This flag can be sent via a signal at at least one level of the Video Parameter Set (VPS), Sequence Parameter Set (SPS), Picture Parameter Set (PPS), or Picture Header (PH).
[0118] As described above, a slice can be configured in a rectangular cell that includes one or more blocks, tiles, or tiled pieces, and the position and size information of the slice can be represented in the corresponding cell.
[0119] A sub-image can include one or more slices. Here, a slice can cover a rectangular area within an image. That is, the boundary of a sub-image can always coincide with the boundary of a slice, and the vertical boundary of a sub-image can always coincide with the vertical boundary of a slice. All decoded unit blocks (CTUs) belonging to a sub-image can belong to the same tile slice. All decoded unit blocks belonging to a tile slice can belong to the same sub-image.
[0120] In this invention, an image may consist of one or more sub-images, a sub-image may consist of one or more slices, tiles, or blocks, a slice may consist of one or more tiles or blocks, and a tile may consist of one or more blocks. This is described assuming that it can be configured, but is not limited thereto. That is, as described above, a tile may consist of one or more slices.
[0121] A partition unit can consist of an integer number of blocks, but is not limited to this, and can consist of decimal numbers instead of integers. That is, when it is not composed of an integer number of blocks, at least one partition unit can consist of sub-blocks. Figure 3 The illustration shows an example of slice division based on raster scanning mode. (Reference) Figure 3 It can be seen that it consists of 18x12 blocks (each column and each row), 12 tiled pieces, and 3 slices. Here, a slice can be considered as an example of a set of blocks or tiled pieces according to a predetermined scan (raster scan).
[0122] Figure 4 The illustration shows an example of slicing based on a rectangular slicing pattern. (Reference) Figure 4 It can be seen that it consists of 18x12 blocks, 24 tile pieces, and 9 slices. Here, the 24 tile pieces can be represented by 6 tile column and 4 tile row.
[0123] Figure 5The illustration shows an example of an image being divided into multiple tiled and rectangular slices. (Reference) Figure 5 An image can consist of 11 tiles, 4 tiles (2 tile columns and 2 tile rows) and 4 slices.
[0124] Figure 6 This illustration shows an example of dividing an image into multiple sub-images. (Reference) Figure 6 An image can be composed of 18 tiles. Here, the 4x4 blocks on the left (i.e., 16 CTUs) can form a tile, and the 2x4 blocks on the right (i.e., 8 CTUs) can form a tile. Moreover, like the tile on the left, a tile can be a sub-image (or slice), and like the tile on the right, a tile can be composed of two sub-images (or slices).
[0125] Table 1 shows examples of information regarding the partitioning or configuration of sub-images and encoding control information (e.g., information about whether a loop filter is applied to the boundaries, etc.) according to this disclosure.
[0126] Table 1
[0127]
[0128] In Table 1, `subpics_present_flag` indicates whether subpicks are supported. When subpicks are supported (when it is 1), information about the number of subpicks (max_subpic_minus1) or information about the width or height of the subpicks (subpic_grid_col_width_minus1, subpic_grid_row_height_minus1) can be generated. In this case, length information such as width and height can be represented as is (e.g., in units of 1 pixel), or it can be represented as a multiple or exponent of a predetermined unit / constant (such as integers like 2, 4, 8, 16, 32, 64, 128, or the maximum decoding unit, minimum decoding unit, maximum transform unit, minimum transform unit, etc.).
[0129] Here, based on the width and height of the image, and the width and height (equal in length) of each sub-image, the number of sub-images existing in the image, organized by columns and rows (NumSubPicGridRows, NumSubPicGridCols), can be exported. Additionally, the total number of sub-images in the image (NumSubPics) can also be exported.
[0130] The example above assumes that the width or height of each sub-image is uniform, but it is possible for at least one of the width or height of each sub-image to be non-uniform. Therefore, a flag can be used to specify whether all sub-images that make up an image have the same size.
[0131] When all sub-images based on the flag do not have the same size, the position information and size information of each sub-image can be encoded / decoded. On the other hand, when all sub-images based on the flag have the same size, the size information can be encoded / decoded only for the first sub-image.
[0132] It can generate information about how many sub-images exist in an image, either in columns or rows, and can generate information about the width or height of each sub-image individually.
[0133] After dividing the sub-images by columns and rows, an index can be assigned to each sub-image. In the implicit case, the index can be assigned based on a predetermined scan order (raster scan, etc.) (e.g., indices 0, 1, 2, etc. are assigned to the first sub-image row from left to right), but explicit index information (subpic_grid_idx) can be generated for each sub-image.
[0134] In the case of a subpic, it can be determined during the decoding process, excluding loop filtering operations, whether to set it as a picture (subpic_treatment_as_pic_flag). This can be related to whether the subpic can be treated as an independent picture in processing such as a list of reference pictures used for inter-frame prediction (when the flag is 1).
[0135] It can be determined whether to set all sub-images within an image as images (applying a common flag), or it can be determined whether to set them individually as images (applying multiple flags individually). Here, multiple separate flags can be encoded / decoded for each sub-image only when there is no restriction imposed on treating all sub-images as images based on a commonly applied flag.
[0136] Additionally, `loop_fiter_across_subpic_enabled_flag[i]` determines whether to perform filtering across the boundary of the i-th subpic. If it is 1, filtering is performed across the boundary of the i-th subpic; if it is 0, filtering is not performed.
[0137] Here, the part related to loop_fitler_across_subpic_enabled_flag can be applied not only in the case of syntax elements, but also in the example of handling the boundaries of various partitioning units described later.
[0138] Regions located at the image boundary cannot be referenced or filtered because there is no data outside the image. That is, regions located inside the image can be referenced or filtered.
[0139] On the other hand, even within an image, it can be divided into units such as sub-images, slices, pieces, and tiles. In the case of some division units, whether to refer to the regions adjacent to the boundaries of different division units, and whether to perform filtering, can be adaptively determined.
[0140] Here, whether two regions are cross-referenced and adjacent to the boundary can be determined by explicit information or implicitly.
[0141] Here, whether to perform boundary filtering (e.g., loop filter or internal loop filter, deblocking filter, SAO, ALF, etc.) can be determined by explicit information or implicitly.
[0142] For example, in some units A, cross-referencing of encoding / decoding between partition units is possible, and filtering can be performed at the boundaries of partition units. For example, in some units B, cross-referencing of encoding / decoding between partition units can be prohibited, and filtering cannot be performed at the boundaries of partition units. For example, in some units C, cross-referencing of encoding / decoding between partition units can be prohibited, and filtering can be performed at the boundaries of partition units. For example, in some units D, cross-referencing of encoding / decoding between partition units is possible, and whether filtering is performed at the boundaries of partition units can be determined based on predetermined flag information. For example, in some units (E), whether cross-referencing of encoding / decoding between partition units can be determined based on predetermined flag information, and whether filtering is performed at the boundaries of partition units can also be determined based on predetermined flag information.
[0143] The division units A through E can correspond to at least one of the sub-images, slices, tiles, or blocks described above. For example, all division units A through E can be sub-images, tiles, or slices. Alternatively, some of the division units A through E can be sub-images, while the rest can be slices or tiles. Alternatively, some of the division units A through E can be slices, while the rest can be tiles.
[0144] Figure 7 The illustration shows a method for performing filtering based on a predetermined flag according to the present disclosure.
[0145] refer to Figure 7 An image can be divided into multiple partition units (S700).
[0146] The dividing unit can be at least one of the aforementioned sub-images, slices, tiles, and blocks. For example, an image can be divided into multiple sub-images. Of course, in addition to sub-images, an image can also be further divided into multiple slices and / or tiles. Since the dividing unit is the same as described above, a detailed description will be omitted here.
[0147] refer to Figure 7 It can be determined whether to perform filtering on the boundary of the partitioned unit based on a predetermined flag (S710).
[0148] For ease of explanation, it is assumed that the partitioning unit in this disclosure is a sub-image. However, this disclosure is not limited to this, and this disclosure can be applied in the same / similar way to the boundaries of slices, tiled pieces, or tiles. In addition, the filtering in this invention can refer to loop filtering applied to the reconstructed image, and the filter used for loop filtering can include at least one of a deblocking filter (DF), a sample adaptive offset (SAO), or an adaptive loop filter (ALF).
[0149] It can support the partitioning of units for purposes such as parallel processing and partial decoding.
[0150] Therefore, when the encoding / decoding of each partition unit is completed, it can be implicitly or explicitly determined whether filtering is performed at the boundary between partition units or at the boundary of the partition unit (e.g., in a loop filter).
[0151] Specifically, a flag indicating whether filtering is performed at the boundaries of the partitioning units can be used. Here, the flag can be implicitly determined in a higher-level unit comprising multiple partitioning units, or it can be explicitly encoded / decoded. A higher-level unit can mean an image, or it can mean a unit consisting only of a portion of the partitioning units constituting an image. Alternatively, the flag can be implicitly determined for each partitioning unit, or it can be explicitly encoded / decoded. Alternatively, a flag can be implicitly determined for each boundary of a partitioning unit, or the flag can be explicitly encoded / decoded. This will refer to... Figures 8 to 15 Detailed description.
[0152] refer to Figure 7 In response to the determination in S710, filtering can be performed on the boundaries of the partitioned units (S720).
[0153] Specifically, at least one of a deblocking filter, a sample adaptive shift, or an adaptive loop filter can be applied to the boundaries of the partitioned units. These filters can be applied sequentially according to a predetermined priority. For example, after applying the deblocking filter, the sample adaptive shift can be applied. After applying the sample adaptive shift, the adaptive loop filter can be applied. (Refer to...) Figure 16Describe in detail the method of applying a deblocking filter to the boundaries of the partitioned cells.
[0154] Figures 8 to 15 A method for determining whether to perform filtering on the boundaries of partitioned units based on one or more flags, according to this disclosure, is shown.
[0155] For each type of partition unit, a flag can be supported to determine whether filtering is performed at the boundaries of the partition unit. For example, one of the following can be supported: a flag indicating whether filtering is performed at the boundaries of a subpic (loop_filter_across_subpic_enabled_flag, hereinafter referred to as the first flag); a flag indicating whether filtering is performed at the boundaries of a slice (loop_filter_across_slices_enabled_flag, hereinafter referred to as the second flag); a flag indicating whether filtering is performed at the boundaries of a tile (loop_filter_across_tiles_enabled_flag, hereinafter referred to as the third flag); or a flag indicating whether filtering is performed at the boundaries of a brick (loop_filter_across_bricks_enabled_flag, hereinafter referred to as the fourth flag).
[0156] Alternatively, the encoding / decoding device may support only some of the flags mentioned above. For example, it may support {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}.
[0157] Furthermore, all of the first to fourth flags mentioned above can be explicitly supported, or some of the first to fourth flags can be explicitly supported, while other flags can be implicitly supported. For example, one of the first to fourth flags can be explicitly supported, and another can be implicitly determined based on the explicitly supported flag.
[0158] In the embodiments described later, for ease of description, the first through fourth flags will be referred to as loop_filter_across_enabled_flag. Furthermore, it is assumed that this flag is supported when the corresponding partitioning unit is supported.
[0159] Figure 8The illustration shows an example where the loop_filter_across_enabled_flag is supported for an image that includes multiple partitions.
[0160] Referring to Table 2, when the flag (loop_filter_across_enabled_flag) is the first value, filtering is restricted and therefore not performed at the boundaries of partitioned units in the image. When the flag is the second value, this restriction is not applied at the boundaries of partitioned units. That is, when the flag is the second value, filtering can be performed at the boundaries of partitioned units within the image, or filtering can be not performed.
[0161] In other words, when the flag is the first value, it can mean that the boundary of the partition unit is considered to be the same as the boundary of the image, and when the flag is the second value, it can mean that no restriction is imposed that the boundary of the partition unit is considered to be the same as the boundary of the image.
[0162] Table 2
[0163] loop_filter_across_enabled_flag
[0164] exist Figure 8 In the diagram, A through F represent a partition unit. The presence of arrows, as shown in the left figure, indicates that filtering can be performed between the boundaries of the partition unit, while the absence of arrows, as shown in the right figure, indicates that filtering between the boundaries of the partition unit is restricted and therefore not performed. For ease of illustration, assume that each partition unit has a rectangular shape.
[0165] The above embodiments refer to the situation where filtering is performed on all segments of an image regardless of the vertical relationship between the segments.
[0166] Figure 9 The illustration shows an example where flags are supported separately in the parent unit of a partitioning unit. That is, based on the flags of the parent unit, it can be determined whether filtering should be performed on the boundaries of the partitioning units present in the parent unit.
[0167] Referring to Table 3, encoding / decoding flags (loop_filter_across_enabled_flag) can be applied to each upper-level unit. `loop_filter_across_enabled_flag[i]` indicates whether filtering is performed on the boundaries of partitioned units within the i-th upper-level unit. For example, when the flag is the first value, filtering is restricted and therefore not performed on the boundaries of partitioned units within the upper-level unit, and when the flag is the second value, this restriction is not applied on the boundaries of partitioned units within the upper-level unit. That is, when the flag is the second value, filtering can be performed on the boundaries of partitioned units within the upper-level unit, or filtering can be omitted.
[0168] Alternatively, when the flag is a first value, filtering may not be performed on the boundaries of the partitioned units within the higher-level unit, and when the flag is a second value, filtering may be performed on the boundaries of the partitioned units within the higher-level unit. This could mean that filtering may be performed on at least one boundary of the partitioned units within the higher-level unit, or on the boundaries of all partitioned units within the higher-level unit.
[0169] In this embodiment, an image can be composed of multiple higher-level units, and each higher-level unit can be composed of multiple partitioning units. For example, when the higher-level unit is a sub-image, the partitioning unit can be a tile, a slice, or a block. Alternatively, a higher-level unit can be defined as a group of sub-images with a size smaller than the image, and in this case, the partitioning unit can be a sub-image, a tile, a slice, or a block.
[0170] Table 3
[0171] for(i=0;i<Num_Units;i++) loop_filter_across_enabled_flag[i]
[0172] The above embodiment refers to the case where a flag is supported in the higher-level unit of a group defined as a predetermined partition unit to determine whether filtering is performed on the boundary of the partition unit.
[0173] refer to Figure 9 An image can be composed of two higher-level units (i.e., the first higher-level unit consisting of A to C and the second higher-level unit consisting of D to F).
[0174] In the first higher-level unit, the flag indicating whether to perform filtering is set to 0; in the second higher-level unit, the flag indicating whether to perform filtering is set to 1. The boundary between the first higher-level unit and the partitioning unit belonging to the second higher-level unit can or may not be filtered by using the flag indicating whether to perform filtering in the higher-level unit.
[0175] Figure 10 This shows the case where the flag for each partition unit that makes up an image is supported (loop_filter_across_enabled_flag).
[0176] Unlike Figure 9 This embodiment is an example of determining whether to perform filtering at the boundaries of each partition unit. Therefore, even if the syntax elements are the same as those in Table 2, their meanings may differ.
[0177] Referring to Table 4, an encoding / decoding flag (loop_filter_across_enabled_flag) can be applied to each partition unit. loop_filter_across_enabled_flag[i] indicates whether filtering is performed on the boundary of the i-th partition unit in the image.
[0178] For example, when the flag is a first value, filtering is restricted to not performing filtering on the boundary of the i-th partition in the image, and when the flag is a second value, filtering can be performed on the boundary of the i-th partition in the image. That is, when the flag is a second value, filtering can be performed on the boundary of partitions within the image, or no filtering can be performed.
[0179] Simultaneously, the flag (loop_filter_across_enabled_flag[i]) for each partition unit can be selectively encoded / decoded based on the flag (loop_filter_across_enabled_flag) used for an image. The flag used for an image and... Figure 8 The embodiments described are the same, and detailed descriptions will be omitted.
[0180] For example, when filtering based on the flags used for an image is restricted to performing filtering on the boundaries of partition units not within the image, the flags for each partition unit are not encoded / decoded. Based on the flags used for an image, the flags for each partition unit can be encoded / decoded only if this restriction is not applied on the boundaries of the partition units.
[0181] Furthermore, the flags used for an image and the flags used for each partition unit can be encoded / decoded at the same level. Here, the same level can be any of the video parameter set, sequence parameter set, or image parameter set.
[0182] Table 4
[0183] for(i=0;i<Num_Units;i++) loop_filter_across_enabled_flag[i]
[0184] refer to Figure 10 Based on the flags used for each partition unit, filtering can be performed on the boundaries of the corresponding partition unit as shown in the left figure, and filtering can also be performed on the boundaries of the corresponding partition unit as shown in the right figure.
[0185] Figure 11 The diagram illustrates a method for determining whether to perform filtering based on the boundary positions of the partitioned units.
[0186] This embodiment is similar to that described above. Figure 9 Implementation examples or Figure 10This relates to the embodiments. When it is determined that filtering is performed at the boundary of each partitioned unit, the predetermined direction information to which filtering is applied can be encoded / decoded.
[0187] Referring to Table 5, information regarding whether filtering is performed on the boundary of at least one of the left, right, top, or bottom directions can be encoded / decoded. When the boundary of a specific direction in the partition unit coincides with the boundary of the image, the encoding / decoding of information regarding the corresponding direction can be omitted.
[0188] In this embodiment, a flag is used to determine whether filtering is performed on the boundary of a specific direction, and a flag can be used to determine whether filtering is performed in units of bundles in some directions (e.g., left + right, up + down, left + right + up, etc.).
[0189] Table 5
[0190]
[0191] refer to Figure 11 The left figure shows the case where filtering is performed on the boundaries of the partition unit (X) in all directions. The middle figure shows the case where filtering is performed only on the left and right boundaries of the partition unit (X), and the right figure shows the case where filtering is not performed on the boundaries of the partition unit (X).
[0192] Figure 12 and Figure 13 A method is shown for determining whether to perform filtering on the boundary of the current partition based on a flag used for adjacent partitions.
[0193] This embodiment can be compared with the above-described embodiment. Figure 10 This relates to the embodiments described above. Specifically, whether to perform filtering on the boundary of the current partition unit can be determined by further considering the flags for adjacent partition units in addition to the flags for the current partition unit. When the boundary of the current partition unit is a vertical boundary, adjacent partition units can mean partition units adjacent to the left or right side of the current partition unit. When the boundary of the current partition unit is a horizontal boundary, adjacent partition units can mean partition units adjacent above or below the current partition unit.
[0194] refer to Figure 12 Suppose filtering is performed on the boundary between partitioned units X and Y. Since filtering is determined to be performed on the boundary where X and Y are in contact, filtering can be performed on the right boundary of partitioned unit X (i.e., the left boundary of partitioned unit Y).
[0195] refer to Figure 13This determines the case where filtering is not performed only on one of the partition units X and Y. That is, since the flag (loop_filter_across_enabled_flag) for partition unit X is 1, filtering can be performed on the boundary of partition unit X. On the other hand, since the flag (loop_filter_across_enabled_flag) for partition unit Y is 0, filtering is not performed on the boundary of partition unit Y.
[0196] One reason for performing filtering between partition units is to reduce the degradation between partition units caused by individual encoding / decoding.
[0197] Therefore, as in the above embodiments, filtering can be performed on the boundary of one of the adjacent partitioned regions and can be performed on the boundary of the other partitioned region.
[0198] Alternatively, if applying filtering only to the boundary of one of the divided regions may be ineffective in removing image quality degradation, it can be determined not to perform filtering on that boundary.
[0199] For example, when the values of the flags used to partition unit X and the flags used to partition unit Y are different from each other, filtering can be performed on the boundary between partition units X and Y, or filtering can be determined to be allowed.
[0200] For example, suppose 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 used for the current partition unit is 0, filtering can be performed on the left boundary of the current block if the flag used for the left partition unit adjacent to the current partition unit is 1.
[0201] Similarly, suppose 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 used for the current partition unit is 0, filtering can be performed on the upper boundary of the current block if the flag used for the upper partition unit adjacent to the current partition unit is 1.
[0202] Alternatively, when the values of the flag used for partitioning unit X and the flag used for partitioning unit Y are different from each other, it can be determined that filtering is not performed or is not allowed on the boundary between partitioning units X and Y.
[0203] For example, suppose 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 used for the current partition unit is 1, if the flag used for the left partition unit adjacent to the current partition unit is 0, filtering can be omitted from the left boundary of the current block.
[0204] Similarly, suppose 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 used for the current partition unit is 1, if the flag used for the upper partition unit adjacent to the current partition unit is 0, filtering can be omitted from the upper boundary of the current block.
[0205] Figure 14 The illustration shows the generation of information indicating whether filtering should be performed for each partitioning unit boundary.
[0206] refer to Figure 14 It can be set to perform filtering on each boundary line of the partitioning or dividing unit A to F. If filtering is performed on the C0 boundary, then filtering can be performed on the A and B boundaries, and on the D and E boundaries; otherwise, filtering is not performed on the boundaries.
[0207] The number or index of C0, C1, R0, etc., can be derived from the partitioning or splitting information of the partitioning units. Alternatively, information for explicitly assigning information about the boundaries and indices of the partitioning units can be generated. As shown in the syntax elements of Table 6 below, information for determining whether to perform filtering at each partitioning unit boundary (in this example, per column or per row) can be generated based on Num_units_rows and Num_unit_cols.
[0208] Table 6
[0209]
[0210] Figure 15 Another example is shown where information indicating whether filtering is performed is generated for each partition unit boundary.
[0211] refer to Figure 15 This allows you to decide whether to perform filtering on each boundary line of the partitioning or dividing unit A to F. Figure 14 The difference in the implementation is that relevant information is generated for each partitioning unit boundary, rather than for a column or row across the image.
[0212] If filtering is performed on the L0 boundary, then filtering can be performed on the A and B boundaries; otherwise, filtering can be omitted from the boundaries.
[0213] The number or index of C0, C1, R0, etc., can be derived from the partitioning or splitting information of the partitioning units. Alternatively, information for explicitly assigning information and indices about the partitioning unit boundaries can be generated. As shown in the syntax elements in Table 7, the information for determining whether to perform filtering at each partitioning unit boundary can be generated based on Num_unit_boundary.
[0214] Table 7
[0215]
[0216] Figure 16 The illustration shows a method for applying a deblocking filter according to the present disclosure.
[0217] refer to Figure 16 You can specify the block boundaries (hereinafter referred to as edges) of the deblocking filter in the block boundaries of the reconstructed image (S1600).
[0218] The reconstructed image can be divided into a predetermined NxM sample grid. An NxM sample grid can represent the cells in which deblocking filtering is performed. Here, N and M can be integers of 4, 8, 16, or more. A per-pixel grid can be defined for each component type. For example, when the component type is a luma component, N and M can be set to 4, and when the component type is a chroma difference component, N and M can be set to 8. Regardless of the component type, a grid of fixed size NxM pixels can be used.
[0219] An edge is a block boundary located on an NxM sample grid and may include at least one of the boundaries of a transform block, a prediction block, or a sub-block.
[0220] refer to Figure 16 Decision values for specified edges can be derived (S1610).
[0221] In this embodiment, it is assumed that the edge type is 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 P block and Q block, respectively. P block and Q block are pre-reconstruction blocks, Q block refers to the region currently undergoing deblocking filtering, and P block can refer to a block that is spatially adjacent to Q block.
[0222] First, the decision value can be derived using the variable dSam, which is used to introduce the decision value. The variable dSam can 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.
[0223] dSam0 can be set to 1 if at least one of the following conditions is met; otherwise, dSam0 can be set to 0.
[0224] Table 8
[0225]
[0226] In Table 8, dpq can be derived based on at least one of the first pixel value linearity dl of the first pixel row of block P or the second pixel value linearity d2 of the first pixel row of block Q. Here, the first pixel value linearity d1 can be derived using the i pixels p belonging to the first pixel row of block P. i can be 3, 4, 5, 6, 7, or more. The i pixels p can be consecutive pixels adjacent to each other, or they can be non-consecutive pixels separated by a predetermined interval. In this case, pixel p can be the i pixels closest to the edge in the first pixel row. Similarly, the second pixel value linearity d2 can be derived using the j pixels q belonging to the first pixel row of block Q. j can be 3, 4, 5, 6, 7, or more. j is set to the same value as i, but is not limited to this, and can be a different value than i. The j pixels q can be consecutive pixels adjacent to each other, or they can be non-consecutive pixels separated by a predetermined interval. In this case, pixel q can be the j pixels closest to the edge in the first pixel row.
[0227] For example, when using three pixels p and three pixels q, the linearity of the first pixel value dl and the linearity of the second pixel value d2 can be derived as shown in Equation 1 below.
[0228] Equation 1
[0229] d1 = Abs(p2,0 - 2*p1,0 + p0,0)
[0230] d2 = Abs(q2,0 - 2 * q1,0 + q0,0)
[0231] Alternatively, when using six pixels p and six pixels q, the linearity of the first pixel value dl and the linearity of the second pixel value d2 can be derived as shown in Equation 2 below.
[0232] Equation 2
[0233] d1=(Abs(p2,0-2*p1,0+p0,0)+Abs(p5,0-2*p4,0+p3,0)+1)>>1
[0234] d2=(Abs(q2,0-2*q1,0+q0,0)+Abs(q5,0-2*q4,0+q3,0)+1)>>1
[0235] In Table 8, sp can represent the first pixel value gradient v1 of the first pixel row of block P, and sq can represent the second pixel value gradient v2 of the first pixel row of block Q. Here, the first pixel value gradient v1 can be derived using m pixels p belonging to the first pixel row of block P. m can be 2, 3, 4, 5, 6, 7, or more. The m pixels p can be consecutive pixels adjacent to each other, or they can be non-consecutive pixels separated by a predetermined interval. Alternatively, some of the m pixels p can be consecutive pixels adjacent to each other, while others can be non-consecutive pixels separated by a predetermined interval. Similarly, the second pixel value gradient v2 can be derived using n pixels q belonging to the first pixel row of block Q. Then n can be 2, 3, 4, 5, 6, 7, or more. n is set to the same value as m, but is not limited to this, and can also be a different value from m. The n pixels q can be consecutive pixels adjacent to each other, or they can be non-consecutive pixels separated by a predetermined interval. Alternatively, some of the n pixels q can be consecutive pixels adjacent to each other, while others can be non-consecutive pixels separated by a predetermined interval.
[0236] For example, when using two pixels p and two pixels q, the gradient v1 of the first pixel value and the gradient v2 of the second pixel value can be derived as shown in Equation 3 below.
[0237] Equation 3
[0238] v1 = Abs(p3,0-p0,0)
[0239] v2 = Abs(q0, 0 - q3, 0)
[0240] Alternatively, when using six pixels p and six pixels q, the gradient v1 of the first pixel value and the gradient v2 of the second pixel value can be derived as shown in Equation 4 below.
[0241] Equation 4
[0242] v1=Abs(p3,0-p0,0)+Abs(p7,0-p6,0-p5,0+p4,0)
[0243] v2=Abs(q0,0-q3,0)+Abs(q4,0-q5,0-q6,0+q7,0)
[0244] The spq in Table 8 can be derived from the difference between the pixel p0,0 and the pixel q0,0 adjacent to the edge.
[0245] The first and second thresholds in Table 8 can be derived based on a predetermined parameter QP. Here, 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 used to introduce QP. The offset can be a value encoded by the encoding device and transmitted as a signal. For example, QP can be derived by adding the offset to the average of the first and second quantization parameters. The third threshold in Table 8 can be derived based on the aforementioned quantization parameter (QP) and block boundary strength (BS). Here, BS can be variably determined by considering the prediction mode of the P / Q blocks, inter-frame prediction mode, the presence or absence of non-zero transform coefficients, differences in motion vectors, etc.
[0246] For example, BS can be set to 2 when at least one prediction mode of the P-block and Q-block is an intra-frame mode. BS can be set to 2 when at least one of the P-blocks or Q-blocks is encoded in a combined prediction mode. BS can be set to 1 when at least one of the P-blocks or Q-blocks includes non-zero transform coefficients. BS can be set to 1 when the P-block is decoded in a different inter-frame prediction mode than the Q-block (e.g., when the P-block is decoded in current picture reference mode and the Q-block is decoded in merge mode or AMVP mode). BS can be set to 1 when the P-block and Q-block are decoded in current picture reference mode and the difference between their block vectors is greater than or equal to a predetermined threshold difference. Here, the threshold difference can be a fixed value (e.g., 4, 8, 16) pre-submitted to the encoding / decoding device.
[0247] Since dSam3 is derived using one or more pixels belonging to the fourth pixel row in the same way as dSam0 described above, a detailed description will be omitted.
[0248] Decision values can be derived based on the derived dSam0 and dSam3. For example, when both dSam0 and dSam3 are 1, the decision value can be set to the first value (e.g., 3), otherwise the decision value can be set to the second value (e.g., 1 or 2).
[0249] refer to Figure 16 The filter type of the deblocking filter can be determined based on the derived decision value (S1620).
[0250] In an encoding / decoding device, multiple filter types with different filter lengths can be defined. Examples of filter types include 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 a short filter but shorter than a long filter. The number of filter types defined in an encoding / decoding device can be 2, 3, 4, or more.
[0251] For example, a long filter can be used when the decision value is the first value, and a short filter can be used when the decision value is the second value. Alternatively, when the decision value is the first value, one of a long filter or a medium filter can be selectively used, and a short filter can be used when the decision value is the second value. Alternatively, a long filter is used when the decision value is the first value, and a short filter or a medium filter can be selectively used when the decision value is not the first value. Specifically, a medium filter can be used when the decision value is 2, and a short filter can be used when the decision value is 1.
[0252] refer to Figure 16 The filtering can be performed on the edges of the reconstructed image based on the deblocking filter according to the determined filter type (S1630).
[0253] Deblocking filters can be applied to multiple pixels located in both directions based on the edge and within the same pixel row. Here, the multiple pixels to which the deblocking filter is applied are referred to as the filtering region, and the length (or number of pixels) of the filtering region can vary for each filter type. The length of the filtering region can be interpreted as having the same meaning as the filter length for the filter type described above. Alternatively, the length of the filtering region can 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.
[0254] In this embodiment, it is assumed that three filter types are defined in the encoding / decoding device: long filters, medium filters, and short filters. Deblocking filtering methods for each filter type will be described. However, this disclosure is not limited to this, and only long and medium filters, only long and short filters, or only medium and short filters may be defined.
[0255] 1. In the case of deblocking filtering based on long filters
[0256] For ease of explanation, it is assumed that the edge type is vertical edge and that the currently filtered pixel (hereinafter, current pixel q) belongs to block Q, unless otherwise stated. The filtered pixel fq can be derived by a weighted average of the first and second reference values.
[0257] Here, a first reference value can be derived using all or some pixels within the filter region to which the current pixel q belongs. The length (or number of pixels) of the filter region can be an integer of 8, 10, 12, 14, or larger. Some pixels within the filter region may belong to a P-block, and others may belong to a Q-block. For example, when the length of the filter region is 10, 5 pixels may belong to a P-block and 5 pixels may belong to a Q-block. Alternatively, 3 pixels may belong to a P-block and 7 pixels to a Q-block. Conversely, 7 pixels may belong to a P-block and 3 pixels to a Q-block. In other words, long-filter-based deblocking filtering can be performed symmetrically or asymmetrically on the P-blocks and Q-blocks.
[0258] Regardless of the current position of pixel q, all pixels belonging to the same filtering region can share the same first reference value. That is, the same first reference value can be used regardless of whether the currently filtered pixel is located in the P block or the Q block.
[0259] A second reference value can be derived using either the pixel furthest from the edge (hereinafter referred to as the first pixel) among the pixels belonging to the Q-block's filter region, or at least one of the neighboring pixels of the filter region. A neighboring pixel can refer to at least one pixel that is right-side adjacent to the filter region. For example, the second reference value can be derived as the average of a first pixel and one neighboring pixel. Alternatively, the second reference value can be derived as the average of two or more first pixels and two or more neighboring pixels that are right-side adjacent to the filter region.
[0260] For a weighted average, predetermined weights fl and f2 can be applied to the first and second reference values, respectively. Specifically, the encoder / decoder can define multiple weight sets, and weight f1 can be set by selectively using any one of the multiple weight sets. The selection can be performed considering the length (or number of pixels) of the filtering region belonging to the Q block. For example, the encoder / decoder can define weight sets as shown in Table 9 below. Each weight set can consist of one or more weights corresponding to each position of the pixel to be filtered. Therefore, a weight corresponding to the position of the current pixel q can be selected from the multiple weights belonging to the selected weight set and applied to the current pixel q. The number of weights constituting a weight set can be the same as the length of the filtering region belonging to the Q block. The multiple weights constituting a weight set can be sampled at predetermined intervals in the range of integers greater than 0 and less than 64. Here, 64 is just an example and can be greater than or less than 64. The predetermined interval can be 9, 13, 17, 21, 25 or more. This interval can be variably determined according to the length L of the filtering region included in the Q block. Alternatively, a fixed interval can be used regardless of L.
[0261] Table 9
[0262] Length (L) of the filtering region belonging to the Q block Weight set L>5 {59,50,41,32,23,14,5} 5 {58,45,32,19,6} L<5 {53,32,11}
[0263] Referring to Table 9, when the length (L) of the filtering region belonging to the Q block is greater than 5, {59, 50, 41, 32, 23, 14, 5} can be selected from the three weight sets; when L is 5, {58, 45, 32, 19, 6} can be selected; and when L is less than 5, {53, 32, 11} can be selected. However, Table 9 is only an example of weight sets, and the number of weight sets defined in the encoder / decoder device can be 2, 4, or more.
[0264] Additionally, when L is 7 and the current pixel is the first pixel q0 based on the edge, a weight of 59 can be applied to the current pixel. When the current pixel is the second pixel q1 based on the edge, a weight of 50 can be applied to the current pixel, and when the current pixel is the seventh pixel q6 based on the edge, a weight of 5 can be applied to the current pixel.
[0265] The weight f2 can be determined based on a predetermined weight fl. For example, the weight f2 can be determined as the 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 can be 64. However, this is just an example, and integers greater than or less than 64 can be used.
[0266] 2. In the case of deblocking filtering based on the medium filter
[0267] The filter length of a medium filter can be shorter than that of a long filter. Similarly, the length (or number of pixels) of the filtering region of a medium filter can be shorter than the length of the filtering region of a long filter.
[0268] For example, the length of the filtering region of the filter can be 6, 8, or more. Here, the length of the filtering region belonging to the P block can be the same as the length of the filtering region belonging to the Q block. However, the invention is not limited to this; the length of the filtering region belonging to the P block can be longer or shorter than the length of the filtering region belonging to the Q block.
[0269] Specifically, the filtered pixel fq can be derived using the current pixel q and at least one neighboring pixel adjacent to the current pixel q. Here, the neighboring pixel can include at least one of one or more pixels adjacent to the left of the current pixel q (hereinafter, left outer pixels) or one or more pixels adjacent to the right of the current pixel q (hereinafter, right outer pixels).
[0270] For example, when the current pixel q is q0, two left adjacent pixels p0 and p1 and two right adjacent pixels q1 and q2 can be used. When the current pixel q is q1, two left adjacent pixels p0 and q0 and one right adjacent pixel q2 can be used. When the current pixel q is q2, three left adjacent pixels p0, q0, and q1 and one right adjacent pixel q3 can be used.
[0271] 3. Deblocking filtering based on short filters
[0272] The filter length of a short filter can be shorter than that of a medium filter. Similarly, the length (or number of pixels) of the filtering region of a short filter can be shorter than the length of the filtering region of a medium filter. For example, the length of the filtering region of a short filter can be 2, 4, or more.
[0273] Specifically, the filtered pixel fq can be derived by adding or subtracting a predetermined first offset (offsetl) from the current pixel q. Here, the first offset can be determined based on the difference between pixels in the P block and pixels in the Q block. For example, as shown in Equation 5 below, the first offset can be determined based on the difference between pixels p0 and q0, and the difference between pixels p1 and q1. However, filtering of the current pixel q can be performed only if the first offset is less than a predetermined threshold. Here, the threshold is derived based on the quantization parameter (QP) and block boundary strength (BS) described above, and its detailed description will be omitted.
[0274] Equation 5
[0275] offset1=(9*(q0-p0)-3*(q1-p1)+8)>>4
[0276] Alternatively, the filtered pixel fq can be derived by adding a predetermined second offset (offset2) to the current pixel q. Here, the second offset can be determined by considering at least one of the difference (or amount of change) between the current pixel q and its neighboring pixels, or the first offset. Neighboring pixels can include at least one of the left or right pixels of the current pixel q. For example, the second offset can be determined as shown in Equation 6 below.
[0277] Equation 6
[0278] offset2=(((q2+q0+1)>>1)-q1-offset1)>>1
[0279] The filtering methods described above are not limited to deblocking filters, but can also be applied similarly or analogously to adaptive sampling offset (SAO), adaptive loop filter (ALF), etc., which are examples of loop filters.
[0280] For clarity, the exemplary methods of this 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 may be performed simultaneously or in a different order if necessary. To implement the methods according to this disclosure, the exemplary steps may include additional steps, may include steps other than some steps, or may include additional steps beyond some steps.
[0281] The various embodiments of this disclosure are not intended to list all possible combinations, but rather to describe representative aspects of this disclosure, and the matters described in the various embodiments may be applied individually or in combination of two or more.
[0282] Furthermore, the various embodiments of this disclosure can be implemented by hardware, firmware, software, or a combination thereof. For hardware implementations, 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) can generally be implemented by processors (general-purpose processors), controllers, microcontrollers, microprocessors, etc.
[0283] The scope of this disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause operations of methods according to various embodiments to be performed on a device or computer, and / or non-transitory computer-readable medium storing such software or instructions and which are executable on a device or computer.
[0284] Industrial applications
[0285] This invention can be used to encode / decode video signals.
Claims
1. A method for decoding an image, comprising: Divide an image into multiple partition units; Determine whether to perform filtering on the boundary of the current partitioning unit based on a predetermined flag; as well as In response to the determination to perform filtering on the boundary of the current partition unit, The current partitioning unit includes at least one of sub-images, slices, or tiled slices. The flag includes at least one of a first flag indicating whether filtering is performed on the boundary of a segmentation unit within an image, or a second flag indicating whether filtering is performed on the boundary of the current segmentation unit in an image. Whether to perform filtering on the boundary of the current partitioning unit is determined by further considering a third flag that indicates whether to perform filtering on the boundary of an adjacent partitioning unit adjacent to the current partitioning unit.
2. The method as described in claim 1, wherein, When the first flag is a first value, no restriction is imposed that prevents filtering from being performed on the boundaries of the partitioning units within the image; and when the first flag is a second value, the restriction is not imposed on the boundaries of the partitioning units within the image. Specifically, when the second flag is the first value, a restriction is imposed to prevent filtering from being performed on the boundary of the current partition unit, and when the second flag is the second value, filtering is allowed to be performed on the boundary of the current partition unit.
3. The method as described in claim 2, wherein, The second flag is decoded only if the first flag is used without imposing a restriction that would cause filtering to be performed on the boundaries of partitioning units that are not within the same image.
4. The method of claim 1, wherein, The position of the adjacent partition unit is determined based on whether the boundary of the current partition unit is a vertical boundary or a horizontal boundary.
5. The method of claim 1, wherein, Performing the filtering includes: Specify the block boundaries for deblocking filtering; Derive decision values for the block boundaries; The filter type for the deblocking filter is determined based on the decision value; and The filtering is performed on the block boundary based on the filter type.
6. A method for encoding an image, comprising: Divide an image into multiple partition units; Determine whether to perform filtering on the boundary of the current partition unit; as well as In response to the determination to perform filtering on the boundary of the current partition unit, The current partitioning unit includes at least one of sub-images, slices, or tiled slices. Determining whether to perform filtering on the boundary of the current partition unit includes: Encode at least one of a first flag indicating whether filtering is performed on the boundary of a segmentation unit within the image, or a second flag indicating whether filtering is performed on the boundary of the current segmentation unit in the image. Whether to perform filtering on the boundary of the current partitioning unit is determined by further considering a third flag that indicates whether to perform filtering on the boundary of an adjacent partitioning unit adjacent to the current partitioning unit.
7. The method of claim 6, wherein, When it is determined that filtering is restricted and therefore not performed on the boundaries of partitioning units within the image, the first flag is encoded as a first value; and when it is determined that the restriction is not applied on the boundaries of the partitioning units within the image, the first flag is encoded as a second value. Specifically, when it is determined that filtering is restricted and therefore not performed on the boundary of the current partition unit, the second flag is encoded as the 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 is encoded as the second value.
8. The method of claim 7, wherein, The second flag is encoded only if there is no restriction that would cause filtering to be performed on the boundaries of the partitioning units that are not within the same image.
9. The method of claim 6, wherein, The positions of adjacent partition units are determined based on whether the boundary of the current partition unit is a vertical or horizontal boundary.
10. The method of claim 6, wherein, Performing the filtering includes: Specify the block boundaries for deblocking filtering; Derive decision values for the block boundaries; The filter type for the deblocking filter is determined based on the decision value; and The filtering is performed on the block boundary based on the filter type.
11. A non-transitory computer-readable storage medium that stores instructions, which, when executed, cause a processor to perform the following operations: Divide an image into multiple partition units; Determine whether to perform filtering on the boundary of the current partition unit based on a predetermined flag; and In response to the determination to perform filtering on the boundary of the current partition unit, in, The current partitioning unit includes at least one of sub-images, slices, or tiled slices. The flag includes at least one of a first flag indicating whether filtering is performed on the boundary of a segmentation unit within an image, or a second flag indicating whether filtering is performed on the boundary of the current segmentation unit in an image. Whether to perform filtering on the boundary of the current partitioning unit is determined by further considering a third flag that indicates whether to perform filtering on the boundary of an adjacent partitioning unit adjacent to the current partitioning unit.
12. A method for transmitting a bit stream, the method comprising: Divide an image into multiple partition units; Determine whether to perform filtering on the boundary of the current partition unit; In response to the determination, filtering is performed on the boundary of the current partition unit to generate the bit stream; as well as Transmit the bit stream, The current partitioning unit includes at least one of sub-images, slices, or tiled slices. Determining whether to perform filtering on the boundary of the current partition unit includes: Encode at least one of a first flag indicating whether filtering is performed on the boundary of a segmentation unit within the image, or a second flag indicating whether filtering is performed on the boundary of the current segmentation unit in the image. Whether to perform filtering on the boundary of the current partitioning unit is determined by further considering a third flag that indicates whether to perform filtering on the boundary of an adjacent partitioning unit adjacent to the current partitioning unit.