Video image information coding / decoding method and device

By deriving the boundary and setting the boundary strength (bS) for block distortion removal filter unit blocks based on encoding mode and transform coefficients, the method addresses the challenge of removing blocking artifacts and reducing complexity in video compression, achieving improved compression efficiency.

JP2025062042AActive Publication Date: 2025-04-11LG ELECTRONICS INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025016118
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2011-12-12
Filing Date
2025-02-03
Publication Date
2025-04-11
Estimated Expiration
2032-11-05

AI Technical Summary

Technical Problem

Existing video compression techniques struggle to effectively remove blocking artifacts and reduce complexity while maintaining high compression efficiency, especially when applying a block distortion removal filter.

Method used

The method involves deriving the boundary of a block distortion removal filter unit block and setting the boundary strength (bS) for each bS setting unit block within the filter unit block. The bS value is set based on the encoding mode of the adjacent blocks, the presence of non-zero transform coefficients, and the use of separate reference pictures or motion vectors.

Benefits of technology

This approach effectively removes block distortion, restores images close to the original, reduces complexity, and enhances compression efficiency by optimally setting unit blocks and bS values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025062042000001_ABST
    Figure 2025062042000001_ABST
Patent Text Reader

Abstract

To provide a method and a device for decoding a video image to be closer to an original video image by effectively removing block distortion.SOLUTION: A block distortion removal filter processing method by a video image decoding device, includes: a step of deriving a boundary of a block distortion removing filter processing unit block as a block of a decoded picture on which block distortion removal filter processing is performed; a step of setting the boundary strength (bS) of the boundary of a bS setting unit block, in which the bS setting unit block is a 4×4 sub block of the block distortion removal filter processing unit block; and a step of applying the block distortion removal filter processing to the boundary of the block distortion removal filter processing unit block on the basis of the bS. The step of setting the bS is constructed so as to include a step of setting the bS to an objective boundary as a boundary of the block distortion removal filter processing unit block which matches the boundary of the bS setting unit block.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to video compression technology, and more particularly to a method for applying a deblocking filter as an in-loop filter. [Background technology]

[0002] Recently, the demand for high-resolution and high-quality images has been increasing in various application fields. However, as the resolution and quality of an image increases, the amount of information related to the image also increases.

[0003] Therefore, when video information is transferred using a medium such as an existing wired or wireless broadband line, or when video information is stored using an existing storage medium, the information transfer cost and storage cost increase.

[0004] In order to efficiently transmit, store and play back high-resolution, high-quality video information, highly efficient video compression techniques can be used.

[0005] To improve the efficiency of video compression, inter prediction and intra prediction can be used. In the inter prediction method, pixel values ​​of a current picture are predicted by referring to information of other pictures, while in the intra prediction method, pixel values ​​are predicted by using the relationship between pixels within the same picture.

[0006] Various methods can be applied to the processing unit of the predicted image, e.g., a block, to make the image identical to the original image, so that a decoder can decode the image more accurately (so that it matches the original image more closely), and an encoder can encode the image so that it can be restored more accurately. Summary of the Invention [Problem to be solved by the invention]

[0007] SUMMARY OF THE PRESENT EMBODIMENT An object of the present invention is to provide a method and apparatus for effectively removing blocking artifacts when applying a deblocking filter to restore an image close to the original image.

[0008] SUMMARY OF THE PRESENT EMBODIMENT An object of the present invention is to provide a method and apparatus for applying a deblocking filter that can reduce complexity and improve compression efficiency.

[0009] An object of the present invention is to provide a method and apparatus for effectively setting a unit block for determining boundary strength (bS) when applying a deblocking filter, thereby reducing complexity.

[0010] SUMMARY OF THE PRESENT EMBODIMENTS An object of the present invention is to provide a method and apparatus for effectively setting the bS value when applying a deblocking filter, thereby reducing the complexity. [Means for solving the problem]

[0011] One embodiment of the present invention, as a bS derivation method, includes a step of deriving a boundary of a block distortion removal filter unit block, which is a unit block to which a block distortion removal filter is applied, and a step of setting a bS for each bS setting unit block within the block distortion removal filter unit block. In the bS setting step, a bS value can be set for a target boundary corresponding to the boundary of the block distortion removal filter unit block as the boundary of the bS setting unit block.

[0012] In the bS setting step, when at least one of the two blocks having the target boundary as the boundary is intra-coded, the bS value of the target boundary is set to bS2. When at least one of the two blocks having the target boundary as the boundary is not intra-coded and the target boundary is an application target of the block distortion removal filter, the bS value of the target boundary is set to bS1. When the target boundary is not an application target of the block distortion removal filter, the bS value of the target boundary can be set to bS0, and bS0, bS1, and bS2 can have a relationship of bS0 < bS1 < bS2.

[0013] When bS is set to bS1, it can include the case where at least one of the two blocks having the target boundary as the boundary is not intra-coded and at least one of the two blocks having the target boundary as the boundary includes a non-zero transform coefficient, and the case where the two blocks having the target boundary as the boundary have different reference pictures or different motion vectors.

[0014] The step of deriving the boundary of the block distortion removal filter unit block and the step of setting bS can be applied to the vertical edges in the picture including the block distortion removal filter unit block and then applied to the horizontal edges in the picture including the block distortion removal filter unit block.

[0015] The block distortion removal filter unit block can be any one of an encoded block, a transformed block, a predicted block, and an 8×8 pixel block. Also, the bS determination unit block can be a 4×4 pixel block.

[0016] Another embodiment of the present invention is a block distortion removal filter method, including a step of setting bS for each bS setting unit block with respect to a target boundary, and a step of applying a block distortion removal filter for each application unit block with respect to the target boundary. In the step of setting bS, as the boundary of the bS setting unit block, a bS value can be set for the target boundary corresponding to the boundary of the block distortion removal filter unit block.

[0017] In the bS setting step, when at least one of the two blocks having the target boundary as the boundary is intra-coded, the bS value of the target boundary is set to bS2. When at least one of the two blocks having the target boundary as the boundary is not intra-coded and the target boundary is an application target of the block distortion removal filter, the bS value of the target boundary is set to bS1. When the target boundary is not an application target of the block distortion removal filter, the bS value of the target boundary can be set to bS0, and bS0, bS1, and bS2 can have a relationship of bS0 < bS1 < bS2.

[0018] When bS is set to bS1, it can include the case where at least one of the two blocks having the target boundary as the boundary is not intra-coded and at least one of the two blocks having the target boundary as the boundary includes a non-zero transform coefficient, and the case where the two blocks having the target boundary as the boundary have different reference pictures or different motion vectors.

[0019] The step of setting bS and the step of applying the block distortion removal filter can be applied to the vertical edges in the picture including the block distortion removal filter unit block first, and then applied to the horizontal edges in the picture including the block distortion removal filter unit block.

[0020] When the bS value set for the target boundary is greater than bS0 and the block distortion removal filter is applied, it is possible to determine whether to apply strong filter processing or weak filter processing.

[0021] Whether to apply strong or weak filtering can be determined based on samples of two blocks that share the target boundary. If the target boundary is a vertical edge, the determination can be based on samples in a sample row that shares the target boundary and that are subject to the block distortion removal filter. If the target boundary is a horizontal edge, the determination can be based on samples in a sample column that shares the target boundary and that are subject to the block distortion removal filter.

[0022] If it is decided to apply weak filtering, it is also possible to apply the filtering to only certain samples that are subject to the deblocking filter.

[0023] The deblocking filter unit block may be any one of a coding block, a transform block, a prediction block, and an 8x8 pixel block, and the bS decision unit block may be a 4x4 pixel block. Effect of the Invention

[0024] According to the present invention, when a block distortion removal filter is applied, block distortion can be effectively removed and an image can be restored close to the original image.

[0025] According to the present invention, when applying a deblocking filter, the complexity can be reduced and the compression efficiency can be increased.

[0026] For example, according to the present invention, when applying a deblocking filter, the complexity can be reduced by effectively setting a unit block for determining bS. Also, according to the present invention, when applying a deblocking filter, the complexity can be reduced by effectively setting a bS value. [Brief description of the drawings]

[0027] [Figure 1] 1 is a block diagram illustrating an encoding device (video encoding device) according to an embodiment of the present invention. [Diagram 2] 1 is a block diagram illustrating a video decoding device according to an embodiment of the present invention. [Diagram 3] 4 is a flow chart illustrating a method of applying a deblocking filter according to the present invention; [Figure 4] FIG. 2 is a schematic diagram illustrating the implementation of a deblocking filter according to the present invention; [Diagram 5] FIG. 11 is a flow chart illustrating an example of a method for determining bS. [Figure 6] FIG. 1 is a diagram illustrating an example of a method for determining a bS value. [Figure 7] FIG. 13 is a diagram for explaining roughly another example of a method for determining a bS value. [Figure 8] FIG. 13 is a diagram for explaining roughly another example of a method for determining a bS value. [Figure 9] 11 is a diagram illustrating an example of a method for determining bS when a boundary of a block removal application unit block coincides with a boundary of a bS determination unit block. FIG. [Figure 10] 13A and 13B are diagrams for explaining roughly another example of a method for determining a representative bS value in a unit block for executing a deblocking filter. [Figure 11] 11 is a flow chart illustrating another example of a method for determining bS. [Figure 12] 10 is a flow chart illustrating an example of a method for determining a bS value to be one of three values. [Figure 13] 10 is a flow chart illustrating an example of a method for determining a bS value to be one of three values. [Figure 14] 10 is a flow chart illustrating an example of a method for determining a bS value to be one of three values. [Figure 15] FIG. 1 is a flow chart outlining a method for determining bS, which is an example of a bS decision tree applied when applying OMBC. [Figure 16] FIG. 1 is a flow chart outlining a method for determining bS, which is an example of a bS decision tree applied when applying OMBC. [Figure 17] FIG. 10 is a diagram illustrating generally an example of how to determine bS and apply a deblocking filter; [Figure 18] FIG. 10 is a diagram illustrating generally an example of how to determine bS and apply a deblocking filter; [Figure 19] 11 is a flow chart for explaining an example of a method for determining a representative bS. FIG. [Figure 20] 13 is a flow chart illustrating another example of a method for determining a representative bS. FIG. [Figure 21] FIG. 2 is a flow chart illustrating a method for pruning a bS decision tree. [Figure 22] 2 is a flow chart illustrating a method for encoding video according to the present invention; [Figure 23] 2 is a flow chart illustrating a method for decoding an image according to the present invention; [Figure 24] 4 is a flow chart illustrating an example of a method for deriving bS according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028] The present invention can be modified in various ways and can have various embodiments, and a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit the present invention to a specific embodiment. The terms used in this specification are merely used to describe a specific embodiment, and are not intended to limit the technical idea of ​​the present invention. A singular expression includes a plural expression unless the context clearly differs. In this specification, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0029] Meanwhile, each component in the drawings described in the present invention is illustrated independently for the convenience of explaining the different characteristic functions of the video encoding / decoding device, and does not mean that each component is realized by separate hardware or software. For example, two or more components among the components may be combined into one component, or one component may be divided into multiple components. An embodiment in which each component is integrated and / or separated is also included in the scope of the present invention as long as it does not deviate from the essence of the present invention.

[0030] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following, the same reference numerals are used to refer to the same elements in the drawings, and duplicated description of the same elements will be omitted.

[0031] 1 is a block diagram illustrating an encoding device (video encoding device) according to an embodiment of the present invention. Referring to FIG. 1, the encoding device 100 includes a picture division unit 105, a prediction unit 110, a transformation unit 115, a quantization unit 120, a reordering unit 125, an entropy encoding unit 130, a dequantization unit 135, an inverse transformation unit 140, a filter unit 145, and a memory 150.

[0032] The picture division unit 105 can divide an input picture into at least one processing unit block. In this case, the processing unit block may be a prediction unit (hereinafter, referred to as 'PU'), a transform unit (hereinafter, referred to as 'TU'), or a coding unit (hereinafter, referred to as 'CU').

[0033] As described later, the prediction unit 110 includes an inter prediction unit that performs inter prediction and an intra prediction unit that performs intra prediction. The prediction unit 110 performs prediction on the processing unit of the picture divided by the picture division unit 105 to generate a prediction block. In the prediction unit 110, the processing unit of the picture may be a CU, a TU, or a PU. In addition, the prediction unit 110 can determine whether the prediction performed on the processing unit is inter prediction or intra prediction, and determine the specific content of each prediction method (for example, a prediction mode, etc.). At this time, the processing unit in which the prediction is performed may differ from the processing unit in which the prediction method and the specific content of the prediction method are determined. For example, the prediction method, prediction mode, etc. are determined on a PU basis, and the prediction can be performed on a TU basis.

[0034] Through inter prediction, prediction may be performed based on information of at least one of a previous picture and / or a subsequent picture of a current picture to generate a predicted block, and through intra prediction, prediction may be performed based on pixel information within the current picture to generate a predicted block.

[0035] Inter prediction methods include skip mode, merge mode, and motion vector prediction (MVP) mode. In inter prediction, a reference picture can be selected for a PU, and a reference block of the same size as the PU can be selected. The reference block can be selected in integer pixel units. Then, a prediction block is generated in which the residual signal with the current PU is minimized and the motion vector size is also minimized.

[0036] The prediction block can be generated in integer sample units, or in sub-integer pixel units such as 1 / 2 pixel units or 1 / 4 pixel units. In this case, the motion vector can also be expressed in units of sub-integer pixels. For example, the motion vector can be expressed in 1 / 4 pixel units for luma samples and 1 / 8 pixel units for chroma samples.

[0037] Information such as an index of a reference picture selected through inter prediction, a motion vector (e.g., a motion vector predictor), and a residual signal are entropy coded and transmitted to a decoding device. When a skip mode is applied, the prediction block can be a reconstructed block, so that the residual may not be generated, transformed, quantized, or transmitted.

[0038] When intra prediction is performed, a prediction mode is determined on a PU basis, and prediction can be performed on a PU basis. Alternatively, a prediction mode is determined on a PU basis, and intra prediction can be performed on a TU basis.

[0039] In intra prediction, prediction modes may include 33 directional prediction modes and at least two non-directional modes. The non-directional modes may include a DC prediction mode and a planar mode.

[0040] In intra prediction, a predicted block may be generated after applying a filter to a reference sample, where whether or not to apply a filter to the reference sample may be determined according to an intra prediction mode and / or a size of a current block.

[0041] The PU is a block of various sizes / shapes. For example, in the case of inter prediction, the PU may be a 2N×2N block, a 2N×N block, an N×2N block, or an N×N block (N is an integer). In the case of intra prediction, the PU may be a 2N×2N block or an N×N block (N is an integer). In this case, the PU of the N×N block size may be set to be applied only in a specific case. For example, it may be set to use the PU of the N×N block size only for the minimum size CU, or it may be set to use only for intra prediction. In addition to the above-mentioned sizes of PU, PUs of N×mN blocks, mN×N blocks, 2N×mN blocks, or mN×2N blocks (m<1) may be further defined and used.

[0042] Residual values ​​(residual blocks or residual signals) between the generated prediction blocks and the original image blocks are input to the conversion unit 115. In addition, prediction mode information, motion vector information, etc. used for prediction are encoded together with the residual values ​​by the entropy encoding unit 130 and transmitted to the decoding device.

[0043] The transform unit 115 performs transform on the residual block in transform units to generate transform coefficients. The transform unit in the transform unit 115 may be a TU and may have a quad tree structure. In this case, the size of the transform unit may be determined within a range of a predetermined maximum and minimum size. The transform unit 115 may transform the residual block using a discrete cosine transform (DCT) and / or a discrete sine transform (DST).

[0044] The quantization unit 120 may generate quantized coefficients by quantizing the residual values ​​transformed by the transformation unit 115. The values ​​calculated by the quantization unit 120 are provided to the inverse quantization unit 135 and the reordering unit 125.

[0045] The rearrangement unit 125 rearranges the quantized coefficients provided from the quantization unit 120. By rearranging the quantized coefficients, the encoding efficiency of the entropy encoding unit 130 can be improved. The rearrangement unit 125 can rearrange the quantized coefficients in a two-dimensional block form into a one-dimensional vector form through a coefficient scanning method. The rearrangement unit 125 can also improve the entropy encoding efficiency of the entropy encoding unit 130 by changing the order of coefficient scanning based on the probabilistic statistics of the coefficients transferred from the quantization unit.

[0046] The entropy encoding unit 130 may perform entropy encoding on the quantized coefficients reordered by the reordering unit 125. For the entropy encoding, an encoding method such as Exponential Golomb, Context Adaptive Variable Length Coding (CAVLC), Context Context Adaptive Binary Arithmetic Coding (CABAC), etc. may be used. The entropy encoding unit 130 may encode various information such as CU quantization coefficient information, block type information, prediction mode information, partition unit information, PU information, transmission unit information, motion vector information, reference picture information, block interpolation information, and filter processing information transmitted from the reordering unit 125 and the prediction unit 110.

[0047] Also, the entropy encoder 130 may make certain changes to the parameter set or syntax to be transmitted, if necessary.

[0048] The inverse quantization unit 135 inversely quantizes the values ​​quantized by the quantization unit 120, and the inverse transform unit 140 inversely transforms the values ​​inversely quantized by the inverse quantization unit 135. A reconstructed block can be generated by combining the residual values ​​generated by the inverse quantization unit 135 and the inverse transform unit 140 with a prediction block predicted by the prediction unit 110.

[0049] 1 illustrates how a residual block and a predicted block are combined to generate a reconstructed block through an adder. In this case, the adder can be regarded as a separate unit (reconstructed block generator) that generates a reconstructed block.

[0050] The filter unit 145 may apply a deblocking filter, an adaptive loop filter (ALF), and a sample adaptive offset (SAO) to the reconstructed picture.

[0051] The deblocking filter can remove distortions that occur at the boundaries between blocks in the restored picture. The ALF can perform filtering based on a value obtained by comparing the restored image with the original image after the blocks are filtered by the deblocking filter. The ALF can also be performed only when high efficiency is applied. The SAO restores the offset difference between the residual block to which the deblocking filter is applied and the original image in pixel units, and is applied in the form of band offset, edge offset, etc.

[0052] On the other hand, the filter unit 145 may not apply filtering to the reconstructed block used in inter prediction.

[0053] The memory 150 may store the reconstructed block or picture calculated by the filter unit 145. The reconstructed block or picture stored in the memory 150 may be provided to the prediction unit 110 that performs inter prediction.

[0054] 2 is a block diagram illustrating a video decoding device according to an embodiment of the present invention. Referring to FIG. 2, the video decoding device 200 may include an entropy decoding unit 210, a reordering unit 215, a dequantization unit 220, an inverse transform unit 225, a prediction unit 230, a filter unit 235, and a memory 240.

[0055] When a video bitstream is input to a video encoding device, the input bitstream can be decoded according to the procedure by which video information is processed in the video encoding device.

[0056] For example, if a variable length coding (hereinafter referred to as 'VLC') such as CAVLC is used to perform entropy coding in the video coding device, the entropy decoder 210 may also be implemented with the same VLC table as the VLC table used in the coding device to perform entropy decoding. Also, if CABAC is used to perform entropy coding in the video coding device, the entropy decoder 210 may perform entropy decoding using CABAC accordingly.

[0057] Among the information decoded by the entropy decoding unit 210, information for generating a prediction block is provided to a prediction unit 230, and residual values ​​entropy-decoded by the entropy decoding unit 210 are input to a reordering unit 215.

[0058] The reordering unit 215 may reorder the bitstream entropy decoded by the entropy decoding unit 210 based on the reordering method used in the video encoding device. The reordering unit 215 may restore and reorder coefficients expressed in a one-dimensional vector form into coefficients in a two-dimensional block form. The reordering unit 215 may receive information related to coefficient scanning performed in the encoding device and perform reordering by a method of scanning in reverse based on the scanning order performed in the encoding device.

[0059] The inverse quantization unit 220 may perform inverse quantization based on a quantization parameter provided by the encoding device and coefficient values ​​of the reordered blocks.

[0060] The inverse transform unit 225 can perform an inverse DCT and / or an inverse DST on the DCT and DST performed by the transform unit of the encoding device for the quantization result performed by the video encoding device. The inverse transform can be performed based on the transfer unit or the division unit of the video determined by the encoding device. In the transform unit of the encoding device, the DCT and / or DST can be selectively performed based on a plurality of pieces of information such as a prediction method, a size of a current block, and a prediction direction, and the inverse transform unit 225 of the decoding device can perform an inverse transform based on the transform information performed by the transform unit of the encoding device.

[0061] The prediction unit 230 may generate a prediction block based on prediction block generation related information provided by the entropy decoding unit 210 and previously decoded block and / or picture information provided by the memory 240.

[0062] If the prediction mode for the current PU is an intra prediction mode, intra prediction can be performed to generate a predictive block based on pixel information in the current picture.

[0063] When the prediction mode for the current PU is an inter prediction mode, the inter prediction for the current PU may be performed based on information included in at least one of the preceding picture or the following picture of the current picture. In this case, the motion information required for the inter prediction of the current PU provided by the video encoding device, such as information on a motion vector, a reference picture index, etc., may be derived from a skip flag, a merge flag, etc. received from the encoding device.

[0064] The reconstructed block may be generated using a predicted block generated by the prediction unit 230 and a residual block provided by the inverse transform unit 225. In FIG 2, it is illustrated that the adder combines the predicted block and the residual block to generate the reconstructed block. In this case, the adder may be regarded as a separate unit (reconstructed block generator) that generates the reconstructed block.

[0065] When skip mode is applied, the residual is not transferred and the prediction block can be the reconstruction block.

[0066] The reconstructed blocks and / or pictures may be provided to a filter unit 235. The filter unit 235 may apply a deblocking filter, SAO and / or ALF, etc. to the reconstructed blocks and / or pictures.

[0067] The memory 240 may store the reconstructed pictures or blocks for use as reference pictures or blocks, and may provide the reconstructed pictures to an output.

[0068] On the other hand, as described above, the filter units of the encoding device and the decoding device can apply a deblocking filter, ALF, or SAO as an in-loop filter.

[0069] The deblocking filter removes interblock artifacts that follow block-wise prediction, transformation, and quantization. The deblocking filter is applied to the edges of the prediction unit or the edges of the transform unit, and a predefined minimum block size can be set for applying the deblocking filter.

[0070] To apply a deblocking filter, first, the block boundary strength (hereinafter referred to as bS) of the horizontal or vertical filter boundary is determined. Whether or not to perform filter processing is determined for each block based on bS. When it is decided to perform filter processing, the type of filter to be applied is determined. The filter to be applied can be selected from a weak filter and a strong filter. The filter processing unit applies the selected filter to the boundary of the block.

[0071] The ALF can be applied after performing SAO, which will be described later. The ALF compensates for coding errors using a Wiener filter, and unlike SAO, is applied globally within a slice. The ALF can also be applied only in the case of high efficiency (HE).

[0072] SAO is a procedure that restores the offset difference between an original image and an image that has been subjected to a deblocking filter on a pixel-by-pixel basis. SAO can compensate for coding errors, which may be caused by quantization. There are two types of SAO: band offset and edge offset.

[0073] As described above, when image restoration is performed in block units (e.g., CU, PU, ​​TU, etc.), block distortion may occur at the boundaries between restored blocks. In order to prevent block distortion, a deblocking filter can be applied, and the deblocking filter can be applied separately to positions where block distortion is likely to occur and positions where block distortion is unlikely to occur even within the same image or picture. For example, deblocking filters can be applied in different manners to positions where block distortion is likely to occur and positions where block distortion is unlikely to occur.

[0074] For this reason, the bS for the boundary between blocks is determined by taking into consideration whether the boundary between blocks corresponds to a boundary to which a deblocking filter is applied, whether the adjacent block is a block to which intra-coding is applied, etc., and a deblocking filter can be applied based on the determined bS.

[0075] On the other hand, when the CU is an I_PCM CU, i.e., a Pulse Coded Modulation (PCM) CU to which intra prediction is applied, the deblocking filter is not applied. The I_PCM mode does not undergo quantization and conversion processes, so the same value as the original image data is restored.

[0076] Therefore, in order to restore the highest image quality (original image quality), the in-loop filter is not applied to the CU in the I_PCM mode (I_PCM CU). For example, in the deblocking filter process, the quantization parameter (qP) for the I_PCM CU can be set to 0 (zero) so that the deblocking filter is not applied to the I_PCM CU.

[0077] Fig. 3 is a flow chart for illustrating a method for applying a deblocking filter according to the present invention. The deblocking filter described in Fig. 3 can be implemented in an encoding device and a decoding device. For example, the filter processing units in Figs. 1 and 2 can implement the deblocking filter described in Fig. 3.

[0078] A deblocking filter is applied to the vertical edges between blocks in the current picture first, and then to the horizontal edges between blocks in the current picture, and then to the horizontal edges in the current picture with the samples modified by the deblocking filter applied to the vertical edges.

[0079] Therefore, the deblocking filter procedure described in FIG. 3 can be applied to the horizontal edges in the current picture after it has been applied to the vertical edges in the current picture.

[0080] Referring to FIG. 3, for edges between blocks, block boundaries are derived for applying a deblocking filter (S310).

[0081] The filter unit can set the size of a current coding block or a current largest coding unit (LCU) (hereinafter, for convenience of explanation, in this specification, the coding block includes the LCU), and determine whether the boundary of the current coding block is not a boundary of the current picture, whether the boundary of the current coding block is a boundary to which the deblocking filter is applied as a tile boundary, or whether the boundary of the current coding block is a boundary to which the deblocking filter is applied as a slice boundary.

[0082] For example, when applying a deblocking filter to a vertical edge, if the left boundary of the currently coded block is the left boundary of the current picture, the left boundary of the currently coded block may be excluded from the target of the deblocking filter. If the left boundary of the currently coded block is the left boundary of the current tile and it is determined not to apply a filter to the edge of the current tile, or if the left boundary of the currently coded block is the left boundary of the current slice and it is determined not to apply a filter to the edge of the current slice, the left boundary of the currently coded block may be excluded from the target of the deblocking filter. Therefore, in the deblocking filter for vertical edges, when the above cases are not met, the deblocking filter may be applied to the left boundary of the currently coded block.

[0083] Furthermore, when applying a deblocking filter to a horizontal edge, if the upper boundary of the current coding block is the upper boundary of the current picture, the upper boundary of the current coding block may be excluded from the target of the deblocking filter. If the upper boundary of the current coding block is the upper boundary of the current tile and it is determined not to apply a filter to the edge of the current tile, or if the upper boundary of the current coding block is the upper boundary of the current slice and it is determined not to apply a filter to the edge of the current slice, the upper boundary of the current coding block may be excluded from the target of the deblocking filter. In the case of a deblocking filter for horizontal edges other than the above, the deblocking filter may be applied to the upper boundary of the current coding block.

[0084] In this specification, applying filtering to a boundary means performing the filtering on certain samples located on both sides of the boundary.

[0085] The filter unit can derive block boundaries for vertical edges of the transform block and the prediction block when applying a deblocking filter to vertical edges in a picture, and can derive block boundaries for horizontal edges of the transform block and the prediction block when applying a deblocking filter to horizontal edges in a picture.

[0086] When an edge of a transform block is an edge of a coding block, the boundary of the transform block can also be derived according to whether a deblocking filter is applied to the edge. When a transform block is divided, the boundary can be derived for each divided block.

[0087] The filter unit can derive a boundary for each partition of the prediction block. For example, when the partition of the prediction block is a 2N×N pixel block, an N×N pixel block, a 2N×nU pixel block, or a 2N×nD pixel block (where N, U, and D are integers corresponding to the number of pixels, and n is an integer corresponding to the number of prediction blocks in the coding block), an edge can be derived for each partition.

[0088] Next, bS for the block boundary to which the deblocking filter is applied is derived (S320). bS is determined for each edge in the current coding block. If the deblocking filter is applied to the vertical edges in the picture, bS is derived for each vertical edge, and if the deblocking filter is applied to the horizontal edges in the picture, bS is derived for each horizontal edge.

[0089] The derivation of bS can be performed in a predetermined unit. For example, bS can be derived for each edge of a transform block or for each edge of a prediction block. Also, bS can be derived in units of blocks of a predetermined size, for example, 8×8 pixel blocks or 4×4 pixel blocks.

[0090] Furthermore, bS may be derived for edges of blocks that satisfy a specific condition among transform blocks, predictive blocks, and blocks of a predetermined size in the current coding block. For example, bS may be derived for a smaller block among transform blocks (e.g., TUs) and predictive blocks (e.g., PUs), and a larger block among blocks of a predetermined size (e.g., 8×8 pixel blocks).

[0091] In other words, bS can be determined in pixel units corresponding to the size of the block that is the unit of bS determination at the boundary of the block to which deblocking is applied (for example, in L pixel units when the unit of bS determination is an L×L pixel block (L is an integer)). The derivation of a specific value of bS will be described later.

[0092] Next, a filter process is performed on the block boundaries according to bS (S330).

[0093] For example, in the case of a luma sample, the bS for the target edge is set to a predetermined reference bS, e.g., bS th1 If bS is less than or equal to a predetermined reference bS, for example, bS th2 It is possible to avoid applying the deblocking filter to the edge in the following cases: th1 and bS th2 They can be set to be the same as or different from each other.

[0094] An additional threshold (referred to as Th1 for ease of explanation) may be set to efficiently apply the deblocking filter. For example, if the reference bS value is set to 0, then Th1 may be used to determine whether to turn on or off the deblocking filter at the block level when the bS value for the target edge is greater than 0. For example, the deblocking filter may be applied to the target edge when the value derived from the target edge is greater than Th1.

[0095] First, when a deblocking filter is applied to a vertical edge in a picture, the value derived from the target vertical edge for comparison with Th1 may be the difference between the filtered samples in the two blocks bordering the vertical edge in a particular sample row. For example, for the samples in the kth sample row (k is an integer), the sum of the differences between the filtered samples adjacent to the vertical edge in the block to the left of the vertical edge, DL, may be k (For example, when three samples from a vertical edge are to be filtered, the sum of the difference between the first sample from the vertical edge and the second sample from the vertical edge, and the sum of the difference between the third sample from the vertical edge and the second sample from the vertical edge) is calculated, and the sum of the differences between the samples to be filtered adjacent to the vertical edge in the right block (current block) of the vertical edge is calculated as DR k (For example, when three samples from a vertical edge are subject to filtering, the sum of the difference between the first sample from the vertical edge and the second sample from the vertical edge, and the difference between the third sample from the vertical edge and the second sample from the vertical edge) can be derived. DL k and D.R. k TonowaD k Compared with Th1, D k If D is smaller than Th1, a deblocking filter can be applied to the vertical edge. kWhen is smaller than Th1, based on the quantization parameter, it can be determined that the vertical boundary is regarded as a boundary where applying the deblocking filter is not effective (e.g., an actual boundary of an image in the original picture), and a picture close to the original picture is restored by applying the deblocking filter.

[0096] In this case, it is also possible to consider the sum of differences between adjacent samples to be filtered for multiple sample rows, rather than considering the sum of differences between adjacent samples to be filtered for only one sample row in two blocks that share a vertical edge as a boundary, as described above. For example, the sum of differences D between samples to be filtered for the k-th sample row in two blocks that share a vertical edge as a boundary can be expressed as k and the sum of the differences between the filtered samples for the k+jth row (j is an integer), D k+j Combined D(=D k +D k+j ) is smaller than a threshold Th1, it may also be decided to apply a deblocking filter for that vertical edge.

[0097] For example, when the difference j between two sample rows is set to 3, if D (=D2+D5) is smaller than Th1 for the second and fifth sample rows, the deblocking filter can be applied to the vertical edge. It is also possible to set the difference j between two sample rows to 3, compare the sum of the differences between samples D (=D0+D3) for the zeroth and third sample rows with Th1, and apply the deblocking filter to the vertical edge if D is smaller than Th1.

[0098] In this case, in order to effectively reflect the characteristics according to each block and sample row, a D value can be derived by adding the absolute value of the sum of the differences between samples to be filtered obtained for each sample row and for each block. In this case, the D value considering the kth sample row and the k+jth sample row of the left block (L) and the right block (R) with the vertical edge as the boundary can be derived as follows:

[0099] <Expression 1> D = abs(DL k )+abs(DL k+j )+abs(DR k )+abs(DR k+j )

[0100] As mentioned above, DL K is the sum of the differences between the samples to be filtered adjacent to the vertical edge in the kth sample row of the left block. When applying a deblocking filter, if three samples adjacent to a vertical edge are targeted, DL K can be derived by the sum of the difference between the first sample from the vertical edge and the second sample from the vertical edge, and the difference between the third sample from the vertical edge and the second sample from the vertical edge in the kth sample row of the vertical edge left block. DR K is the sum of the differences between the filtered samples adjacent to the vertical edge in the kth sample row of the right block. For example, when applying a deblocking filter, DR K can be derived by the sum of the difference between the first sample from the vertical edge and the second sample from the vertical edge, and the difference between the third sample from the vertical edge and the second sample from the vertical edge in the kth sample row of the vertical edge right block.

[0101] As described above, even when the sum of the differences between adjacent samples to be filtered is calculated by considering multiple sample rows, the deblocking filter can be applied more effectively by considering the sum of the differences between adjacent samples to be filtered for each sample row. For example, referring to Equation 1, if only k sample rows are considered, D k can be defined as follows:

[0102] <Expression 2> D k =abs(DL k )+abs(DR k )

[0103] For example, for the vertical edge, if the kth sample row and the k+3th sample row are considered as in the above example, D is smaller than Th1, and D for the kth sample row is k and D for the k+3th sample row k+3 When D is smaller than half of Th1 (Th1 / 2), strong filtering can be applied to the vertical edge. k is not smaller than Th1 / 2 or D k+3 If is not less than Th1 / 2, weak filtering may be applied to the vertical edge.

[0104] When applying weak filtering, filtering can be applied only to specific samples among the samples to be filtered, and in this case, the filter coefficients can be applied differently from those in the case of strong filtering. For example, if the samples to be filtered are six samples located on the left and right of a vertical edge (three samples on the left side of the edge and three samples on the right side of the edge), strong filtering can be applied to all the samples to be filtered, while weak filtering can be applied to two samples on the left side of the target edge and two samples on the right side of the target edge. In this case, the filter coefficients of the strong filtering and the weak filtering can be different.

[0105] When a deblocking filter is applied to a horizontal edge in a picture, the value derived from the target horizontal edge for comparison with Th1 can also take into account the difference between the filtered samples in two blocks bordering the horizontal edge in a particular sample column. As explained in the vertical edge example, for a sample in the kth sample column (k is an integer), the sum of the differences between the filtered samples adjacent to the horizontal edge in the block above the horizontal edge, DT k(For example, when a block removal filter is applied, if three samples from a horizontal edge are subject to filtering, the sum of the difference between the first sample from the horizontal edge and the second sample from the horizontal edge, and the sum of the difference between the third sample from the horizontal edge and the second sample from the horizontal edge) is calculated, and the sum of the differences between the filtered samples adjacent to the horizontal edge in the lower block (current block) of the horizontal edge is calculated. k (For example, when a deblocking filter is applied, if three samples from a horizontal edge are subject to filtering, the sum of the difference between the first sample from the horizontal edge and the second sample from the horizontal edge, and the difference between the third sample from the horizontal edge and the second sample from the horizontal edge) can be derived. DT k and DB k TonowaD k Compared with Th1, D k If Th is smaller than Th1, a deblocking filter can be applied to the horizontal edge.

[0106] In this case, the sum of differences between adjacent samples to be filtered for multiple sample strings in two blocks bounded by a horizontal edge can also be considered. For example, the sum of differences D between samples to be filtered for the k-th sample string in two blocks bounded by a horizontal edge can be calculated as follows: k and the sum of the differences between the filtered samples for the k+jth column (j is an integer), D k+j Combined with D(=D k +D k+j ) is smaller than a threshold Th1, it may be decided to apply a deblocking filter for that horizontal edge.

[0107] Taking the case where the difference j between two sample columns is set to 3 as an example, if D (=D2+D5) is smaller than Th1 for the second and fifth sample columns, a deblocking filter can be applied to the vertical edge. Alternatively, the difference j between two sample columns can be set to 3, and the sum of the differences between samples D (=D0+D3) for the zeroth and third sample columns can be compared with Th1, and if D is smaller than Th1, a deblocking filter can be applied to the horizontal edge.

[0108] The sample row considered for the vertical edge and the sample column considered for the horizontal edge may be the corresponding sample row and sample column, for example, when the 0th sample row and the 3rd sample row are considered for the vertical edge, the 0th sample column and the 3rd sample column may be considered for the horizontal edge.

[0109] As in the case of vertical edges, in order to effectively reflect the characteristics of each block and sample row, the absolute value of the sum of the differences between the samples to be filtered calculated for each sample row and for each block can be taken. In this case, the value D considering the kth sample row and the k+jth sample row of the upper block (T) and the lower block (B) with the horizontal edge as the boundary can be derived as follows:

[0110] <Expression 3> D = abs(DT k )+abs(DT k+j )+abs(DB k )+abs(DB k+j )

[0111] As mentioned above, DT K is the sum of the differences between the samples to be filtered adjacent to the horizontal edge in the kth sample row of the upper block. When applying a deblocking filter, DT KDB can be derived by the sum of the difference between the first sample from the horizontal edge and the second sample from the horizontal edge, and the difference between the third sample from the horizontal edge and the second sample from the horizontal edge in the k-th sample row of the horizontal edge upper block. K is the sum of the differences between the samples to be filtered that are adjacent to the horizontal edge in the kth sample row of the lower block. For example, when applying a deblocking filter, when three samples adjacent to a horizontal edge are targeted, DB K can be derived by the sum of the difference between the first sample from the horizontal edge and the second sample from the horizontal edge in the kth sample column of the block below the horizontal edge, and the difference between the third sample from the horizontal edge and the second sample from the horizontal edge.

[0112] As explained in the vertical edge example, a more efficient deblocking filter can be applied by considering, for each sample column, the sum of the differences between adjacent samples to be filtered. For example, referring to Equation 3, if we consider only the k sample column, D k can be defined as Equation 4.

[0113] <Expression 4> D k =abs(DT k )+abs(DB k )

[0114] For example, when considering the k-th sample sequence and the k+3-th sample sequence for the horizontal edge, as in the above example, D is smaller than Th1, and D for the k-th sample sequence is k and D for the k+3th sample sequence k+3 If each of D is smaller than 1 / 4 of Th1 and satisfies a predetermined relationship with respect to the other block removal parameters, strong filtering can be applied to the horizontal edge. k is not less than Th1 / 4 or D k+3If is not smaller than Th1 / 4 and satisfies a predetermined condition, weak filtering may be applied to the horizontal edge.

[0115] When applying weak filtering, filtering can be applied only to specific samples among the samples to be filtered, and in this case, a filter coefficient different from that of the strong filter can be applied. For example, if the samples to be filtered are six samples located above and below a horizontal edge (three samples above the edge and three samples below the edge), strong filtering can be applied to all the samples to be filtered, while weak filtering can be applied to two samples located above the edge and two samples located below the edge. In this case, the filter coefficients for strong filtering and weak filtering can be different.

[0116] The strong and weak filtering may also be applied in the same manner (eg, the same filter coefficients or offsets) to vertical and horizontal edges.

[0117] As described above, when determining whether to apply a deblocking filter, which of a strong filter and a weak filter to apply, and which samples to apply the weak filter to, the filter unit may apply the deblocking filter according to a predetermined method (e.g., a filter coefficient or an offset, etc.) As described above, after applying the deblocking filter to vertical edges in a picture, the filter unit may apply the deblocking filter to horizontal edges in the picture.

[0118] FIG. 3 describes a method of applying a deblocking filter in major steps, such as deriving a block boundary (S310), deriving bS (S320), and applying a filter process (S330). However, the above process from determining bS to applying a filter process can also be divided into more detailed steps.

[0119] For example, the following steps may be performed for a horizontal deblocking filter for a vertical edge in a picture: (1) For a vertical edge in a coding block (which may be an LCU), bS is determined. The edge for which bS is determined may be an edge for a smaller block among TUs and PUs, an edge of a predetermined unit block (e.g., an 8×8 pixel block), or an edge between a smaller unit block among TUs and PUs and a larger block among the predetermined unit blocks. (2) For edges for which bS is greater than 0, it is determined whether to turn on / off the deblocking filter at the block level. For this purpose, as described above, a predetermined sample row (e.g., the second and fifth sample rows) of the blocks on both sides of the boundary (edge) can be used. (3) It is determined whether to apply filtering or weak filtering to the region for which filtering is turned on. (4) If weak filtering is applied, it is determined whether to turn on / off additional filtering. As described above, turning on / off additional filtering includes turning on / off filtering for each specific sample. (5) Move to the next coding block (including the LCU) in the current picture and repeat the steps - perform deblocking filtering on all vertical edges in the picture.

[0120] The following steps may be performed for a vertical deblocking filter for horizontal edges in a picture: (1) For a horizontal edge in a coding block (which may be an LCU), bS is determined. The edge for which bS is determined may be an edge for a smaller block among TUs and PUs, an edge of a predetermined unit block (e.g., an 8×8 pixel block), or an edge of a smaller unit block among TUs and PUs and a larger block among the predetermined unit blocks. (2) For an edge for which bS is greater than 0, it is determined whether to turn on / off the deblocking filter at a block level. For this purpose, as described above, a predetermined sample sequence (e.g., the second and fifth sample sequences) of the blocks on both sides of the boundary (edge) may be used. (3) It is determined whether to apply strong filtering or weak filtering to the region for which filtering is to be turned on. (4) If weak filtering is to be applied, it is determined whether to turn on / off additional filtering. The additional filtering on / off includes a filtering on / off decision for each specific sample, as described above. (5) It moves to the next coding block (including an LCU) in the current picture, and the steps are repeated. Perform deblocking filtering on all horizontal edges in the picture.

[0121] 4 is a diagram for explaining an outline of a deblocking filter execution method according to the present invention. Referring to FIG. 4, deblocking filters are executed on edges in each coding block (e.g., LCU) (401). As described above, deblocking filters are executed on vertical edges (horizontal filtering) on ​​the entire current picture, and then deblocking filters are executed on horizontal edges (vertical filtering) on ​​the entire current picture.

[0122] FIG. 5 is a flow chart outlining an example of a method for determining bS.

[0123] For ease of explanation, in this specification, in the deblocking filter process, the current block is represented as block Q, and the block adjacent to the current block that has been coded / decoded prior to the current block is represented as block P. For example, when performing deblocking filter on a vertical edge, the left block with respect to the vertical edge as a boundary is represented as block P, and the right block is represented as block Q. Also, when performing deblocking filter on a horizontal edge, the upper block with respect to the horizontal edge as a boundary is represented as block P, and the lower block is represented as block Q.

[0124] Also, a sample belonging to block P is represented by p, and a sample belonging to block Q is represented by q. For example, the i-th sample from the boundary (edge) between blocks P and Q in a specific sample row or column belonging to block P is represented by p. i (i=0,1,2,...). Similarly, the i-th sample belonging to block Q and located at the boundary (edge) between blocks P and Q in a particular sample row or column can be expressed as q i (i=0,1,2,...).

[0125] Referring to FIG. 5, to determine bS, first, it is determined whether block P and / or block Q are intra-coded (S510).

[0126] If the block P and / or the block Q is intra-coded, it is determined whether the boundary between the block P and the block Q is a CU boundary (S520). In this case, the CU boundary may be an LCU boundary.

[0127] In step S520, if the boundary between blocks P and Q is a CU boundary, the value of bS for the boundary between blocks P and Q is determined to be 4 (S530).

[0128] In step S520, if the boundary between blocks P and Q is not a CU boundary, the value of bS for the boundary between blocks P and Q is determined to be 3 (S540).

[0129] When the block P and / or the block Q is not intra-coded, it is determined whether the block P and / or the block Q includes a non-zero coefficient (transform coefficient) (S550). At this time, the filter unit can determine whether or not the non-zero transform coefficient exists based on the transform coefficient before inverse quantization. The filter unit can also determine whether or not the non-zero transform coefficient exists based on the transform coefficient after inverse quantization.

[0130] In step S550, if block P and / or block Q contains coefficients (non-zero transform coefficients), bS for the boundary between block P and block Q is determined to be 2 (S560).

[0131] If block P and / or block Q does not contain any coefficients (non-zero transform coefficients) in step S550, it is determined whether block P and block Q have different reference pictures or different motion vectors (S570).

[0132] In step S570, if block P and block Q have different reference pictures or different motion vectors, bS for the boundary between block P and block Q is determined to be 1 (S580).

[0133] In other cases, that is, when the block distortion removal filter is not applied, bS for the boundary between block P and block Q is set to 0 (S590). For convenience of explanation, FIG. 5 illustrates an example of when bS is not applied, in which none of the above conditions are satisfied.

[0134] On the other hand, it is also possible to set the values ​​of the variables required for the deblocking filter according to the bS value.

[0135] For example, the t c An example would be a variable like offset. c offset is the t c This is the value set by the user to determine the value of t c is one of the thresholds used to quantify the blockiness according to the degree of quantization and to determine the parameters associated with the deblocking filter.

[0136] In FIG. 5, when bS value is 0, 1, or 2, t c Set offset to 0, and if bS is 3 or 4, set t c Here is a simple example of setting the offset to 2:

[0137] Meanwhile, in order to effectively apply the deblocking filter, the block unit and the method for determining bS described above with reference to FIGS. 3 and 5 may be modified and applied.

[0138] bS can be determined in units equal to or smaller than the block units for which the deblocking filter is actually executed.

[0139] For example, when an actual deblocking filter is applied to a luminance sample in units of 8×8 pixels, bS can be determined in units of 4×4 pixels. In this manner, when the size of a unit block for applying the deblocking filter is larger than the size of a unit block for determining bS, bS can be determined only at the boundaries (edges) of the unit blocks for determining bS that correspond to the boundaries (edges) of the unit blocks for applying the deblocking filter. In other words, when bS is determined for each L×L (L is an integer) pixel block, bS is determined in units of L pixels at the boundaries of the unit blocks for applying the deblocking filter.

[0140] Specifically, taking an example where the block unit for determining bS is a 4×4 pixel block and the actual deblocking filter is executed in units of 8×8 pixel blocks, bS is determined in units of 4 pixels at the boundaries of the 8×8 pixel blocks on which the deblocking filter is executed. Therefore, it is not necessary to determine bS for 4×4 pixel block edges within the 8×8 pixel blocks that are the unit of the deblocking filter.

[0141] An example of a method for determining a bS value is illustrated in FIG 6. In FIG 6, a case is taken as an example in which a unit block 600 of the deblocking filter is an 8x8 pixel block, and a unit block for determining bS is a 4x4 pixel block.

[0142] Referring to FIG. 6, within the unit block 600 of the deblocking filter, there are vertical and horizontal edges that are boundaries (edges) of the 4×4 pixel block that becomes the unit block for determining bS and that are also boundaries of the unit block 600 of the deblocking filter.

[0143] Taking the case of vertical edges as an example, there are two vertical edges 610 and 620 that are the subject of bS determination in a deblocking filter unit block 600. In the example of Figure 6, the bS of the first vertical edge 610 is compared with the bS of the second vertical edge 620, and the larger bS is determined as the representative bS for the vertical edges of the deblocking filter unit block 600.

[0144] For example, if the bS of the first vertical edge 610 is 1 and the bS of the second vertical edge 620 is 2, the bS value of the second vertical edge 620, 2, may be determined as the representative bS value for the vertical edge that is the left boundary of the unit block 600 of the deblocking filter.

[0145] In FIG. 6, for convenience of explanation, the case of a vertical edge is taken as an example, but the same method can be applied to the case of a horizontal edge.

[0146] In the example of FIG. 6, if the two bS values ​​are the same, it goes without saying that either one of the two bS values ​​can be used as the representative bS value.

[0147] Another example of a method of not deriving bS for boundaries located inside a unit block to which a block distortion removal filter is applied, as shown in FIG. 6, i.e., a method of deriving bS only for boundaries (edges) of a unit block to which a block distortion removal filter is applied and for which bS is determined, will be specifically described.

[0148] Figures 7 and 8 are diagrams for explaining another example of a method for determining a bS value. In the examples of Figures 7 and 8, a method for allocating a bS value through a two-step process is explained as an example. Specifically, in the examples of Figures 7 and 8, when a 4x4 pixel block is a unit for determining bS and an 8x8 pixel block is a unit for processing a deblocking filter, a method for determining bS in 4x4 pixel units and then reallocating bS in 8x8 pixel block units is explained.

[0149] 7 is a diagram for explaining an example of a method for setting bS for each bS determination unit. Referring to FIG. 7, a 16×16 pixel block (e.g., CU) has a 4×4 pixel block (e.g., TU) that is a bS determination unit, as shown in the figure. A bS value can be determined for each boundary of the 4×4 pixel block.

[0150] An example of a specific process (step 1) for determining bS for each 4×4 pixel block is as follows.

[0151] <How to set bS in 4x4 pixel blocks - Step 1>

[0152] The position of the luminance sample at the upper left side of the current block, for example, CU, is specified as (xC, yC) based on the luminance sample at the upper left side of the current picture. The variable specifying the size of the CU, which is the current block, is log2CUSize, and the vertical and horizontal edges for which bS is determined are specified by the two-dimensional arrays horEdgeFlags and verEdgeFlags. In this case, the size of the two-dimensional array is nS×nS, where nS=1< <log2CUSizeである。

[0153] (xE k , yE j ) specifies the set of edge sample locations, where k = 0, …, nE-1 and j = 0, …, nE-1, with nE being ((1<<log2CUSize)> >2), xE0=0, yE0=0, xE k+1 =xE k +4, yE j+1 =yE j It has a relationship of +4.

[0154] In this case, the samples to which the deblocking filter is applied for horizontal and vertical edges specify a set of edge sample locations (xE k , yE j For example, for a horizontal edge, (1) when the information indicating that it is a horizontal edge indicates that a deblocking filter is to be applied to the edge (bS determines that), (e.g., horEdgeFlags[xE k ][yE j ]=1), (2) p0 is the (xC+xE k , yC+yE j -1), and q0 is the (xC+xE k , yC+yE j ), (3) in which case the direction of the deblocking filter is vertical.

[0155] For vertical edges, (1) when the information indicating that the edge is vertical indicates that a deblocking filter is to be applied to the edge (bS determines that), e.g., verEdgeFlags[xE k ][yE j ]=1), (2) p0 is the (xC+xE k -1, yC+yE j ), and q0 is set to (xC+xE k , yC+yE j ), and (3) in this case the direction of the deblocking filter is horizontal.

[0156] According to the above-mentioned method (step 1), the number of 4×4 pixel blocks, which are the bS determination unit, in the current CU (current block) is counted (how many multiples of 4 pixels the horizontal and vertical dimensions of the current CU are) ((1<<log2CUSize)> >2) and assign it to nE value. Therefore, in step 1, En bS can be set horizontally and vertically in units of 4 pixels for the current block. (xEk, yEj) is incremented by 4 pixels (xE k+1 =xE k +4, yE j+1 =yE j +4), that is, the index is increased so that the process of determining bS can be performed in units of 4×4 pixel blocks within the current block (current CU).

[0157] Following the above-mentioned method (step 1), the bS values ​​set for each bS determination unit can be reallocated for each deblocking filtering unit (step 2).

[0158] 8 is a diagram for explaining an example of a method for reallocating bS for each deblocking filter processing unit, where a bS value can be set for each 8×8 deblocking application unit block.

[0159] In step 2 described in FIG. 8, the bS values ​​for the 4×4 pixel block units determined in step 1 are compared, and one of the bS values ​​for the two adjacent edges is used as the representative bS for the 8×8 block removal filter processing unit.

[0160] For example, in FIG. 8, for the left vertical edge of the deblocking filtering unit block 810 in the current CU 800, the bS of the upper edge is v1 and bS on the lower edge, bS v2 and the larger value is the bS value for the left vertical edge of block 810 (bS v ) can be used. In addition, for the upper horizontal edge of the deblocking filtering unit block 820 in the current CU 800, the bS of the left edge, bS h1 and the right edge bS h2 and the larger value is the bS value for the upper horizontal edge of block 820 (bS h In this case, among the bS determined in step 1, the bS value for an edge located within an 8×8 pixel block, which is a unit block to which the deblocking filter is applied, is not assigned.

[0161] An example of a specific process (step 2) for reallocating bS for each 8×8 pixel block to perform deblocking filtering is as follows.

[0162] <How to allocate BS in 8x8 pixel blocks and execute deblocking filter - Step 2>

[0163] The position of the luminance sample at the upper left side of the current block, for example, in the CU, is specified as (xC, yC) based on the luminance sample at the upper left side of the current picture. A variable specifying the size of the CU that is the current block is log2CUSize, and an array bS specifies the boundary filtering strength.

[0164] The block distortion removal filter for the current block, for example, the luminance edge of the current CU, can be executed in the following steps.

[0165] (1) Set the variable nD to 1<<(log2CUSize - 3).

[0166] (2) Initialize all elements of the 3D array dEdge of size (2)×(nD)×(nD) to 0.

[0167] (3) Initialize all elements of the 3D array dSample of size (2)×(nD)×(1<<log2CUSize) to 0.

[0168] (4) Initialize all elements of the 3D array bStrength of size (2)×(nD)×(nD) to 0.

[0169] (5) ×D k Set the value to xC+(k<<3). At this time, the value of k is 0,…,nD - 1. For each xD k value, set yD m to yC+(m<<3) and execute the following procedure. At this time, the value of m is 0,…,nD - 1.

[0170] (5 - 1) Derive the boundary filter processing strength bSVer for the vertical edge as follows. bSVer = Max(bS[0][xD k [yD m +i]). At this time, i is 0,…,7. bS[0][xD k [yD m +i] is the boundary filter processing strength for the vertical edge, and it means the bS value defined based on (xD k , yD m +i).

[0171] (5 - 2) Set the value of bStrength[0][k][m] to the bSVer value.

[0172] (5-3) A decision process is performed for the luminance block edge based on the luminance sample position (xC, yC) of the current CU, the luminance sample position (xDk, yDm) of the current block, information indicating that it is a vertical edge to which the block removal filter is applied, and the boundary filter processing strength bSVer, and dEdge[0][k][m] indicating whether to apply strong or weak filter processing as information regarding the decision, and an array dS of size 8×8 are determined.

[0173] (5-4) Set dSample[0][k][(m<<3)+i] to dS[i] for determining the dEdge value, where i is 0,...,7.

[0174] (5-5) Derive the boundary filtering strength bSHor for horizontal edges as follows: bSHor=Max(bS[1][xD k +i][yD m ]), where i is 0,…,7. bS[0][xD k +i][yD m ] is the boundary filtering strength for horizontal edges, (xD k +i, yD m ) is the bS value defined based on the standard.

[0175] (5-6) Set the value of bStrength[1][k][m] to the value of bSVer.

[0176] (5-7) A decision process is performed for the luminance block edge based on the luminance sample position (xC, yC) of the current CU, the luminance sample position (xDk, yDm) of the current block, information indicating that it is a vertical edge to which the block removal filter is applied, and the boundary filter processing strength bSHor, and dEdge[1][k][m] indicating whether to apply strong or weak filtering as information regarding the decision, and an array dS of size 8×8 are determined.

[0177] (5-8) Set dSample[1][m][(k<<3)+i] to dS[i] for determining the dEdge value, where i is 0,...,7.

[0178] (6) For edges for which it has been determined that a deblocking filter should be applied, the deblocking filter is executed based on the bS value, the dEdge value, the dSample value, and the like.

[0179] To explain the method of step 2, log2CUSize-3 is used to derive nD, which represents the number of deblocking filter processing unit blocks in the current block. That is, in 8x8 pixel block units, the deblocking filter can be applied to the vertical edges and horizontal edges of the current block (current CU) as many times as the number of 8x8 pixel blocks.

[0180] Next, the bS value for the vertical edge and the bS value for the horizontal edge are compared for each of the 8 pixels, and the largest bS value is set. For example, the bS value for the vertical edge, bSVer, is Max(bS[0][xD k ][yD m +i]), and bSHor, the bS for horizontal edges, is set to Max(bS[1][xD k +i][yD m ]), where i is 0,...,7. The value of i is changed from 0 to 7, and the bS values ​​based on 8 pixels are compared, and the largest bS can be set as the bS for the current deblocking filtered block. For example, the bS values ​​based on 8 pixels along a vertical edge can be compared, and the largest bS can be set as the bS for the vertical edge of the current deblocking filtered block, and the bS values ​​based on 8 pixels along a horizontal edge can be compared, and the largest bS can be set as the bS for the horizontal edge of the current deblocking filtered block.

[0181] Therefore, in step 1, bS is determined for each boundary of all 4x4 pixel blocks (bS determination unit blocks), but in step 2, the bS determined at the boundary of the 8x8 pixel block (deblocking filter processing unit block) is used to set bSVer, which is the bS for vertical edges, and bSHor, which is the bS for horizontal edges, at the boundary of the 8x8 pixel block (deblocking filter processing unit block).

[0182] In step 1 of FIG. 7 and FIG. 8, in order to clearly illustrate that processing is performed in units of 4 pixels, ((1<<log2CUSize)> >2), xE k+1 =xE k +4, yE j+1 =yE j +4, the present invention is not limited to this formula. For example, if bS can be determined in a predetermined bS determination unit (4x4 pixel block in the above example), bS can be set for each bS determination unit by applying another relationship that represents this.

[0183] 7 and 8, equations such as log2CUSize-3 are used to clearly explain that processing is performed in 8-pixel units, but the present invention is not limited to these equations. For example, if a deblocking filter is applied in a predetermined deblocking filter processing unit (8×8 pixel blocks in the above example) and bS can be assigned as a result, bS can also be reallocated for each deblocking filter processing unit by applying another equation that represents this.

[0184] 7 and 8, the current block is a CU as a luminance sample, but the present invention is not limited thereto and can be applied to a chrominance sample or a processing unit other than a CU (e.g., a PU or a TU). Also, the present invention can be applied to a case where the bS determination unit is a 4×4 pixel block and the deblocking filter processing unit is not an 8×8 pixel block.

[0185] On the other hand, in the examples of FIGS. 7 and 8, in step 1, the bS value is determined / assigned for each boundary of all 4×4 pixel blocks, while in step 2, bSVer and bSHor are obtained at the boundaries of 8×8 pixel blocks. Therefore, in the examples of FIGS. 7 and 8, it is an unnecessary process to determine bS for the edges inside the 8×8 pixel blocks.

[0186] Therefore, in order to reduce the complexity of the block distortion removal filter process, a method of deriving bS only when it is at the boundary of the block distortion removal filter processing unit block and also at the boundary of the bS determination unit block can be considered. For example, a method of determining bS in the bS determination unit for each block distortion removal filter processing unit block (bS derivation method 1), and a method of determining bS for each bS determination unit and adding a condition that the boundary of the bS determination unit is at the boundary of the block distortion removal filter processing unit block (bS derivation method 2) can be considered.

[0187] First, an example of the method of determining bS in the bS determination unit for each block distortion removal filter processing unit block is as follows.

[0188] <bS derivation method 1>

[0189] The position of the luminance sample at the upper left side in the current block, for example, in the CU, is specified as (xC, yC) based on the upper left side luminance sample of the current picture. Let the variable specifying the size of the CU which is the current block be log2CUSize, and assume that the vertical edge and the horizontal edge where bS is determined are indicated by the two-dimensional arrays horEdgeFlags and verEdgeFlags. At this time, the size of the two-dimensional array is nS×nS, and nS = 1<<log2CUSize.

[0190] (xE k , yE j ) is assumed to specify the set of edge peripheral sample (edge sample) positions. k = 0,…, nE - 1, j = 0,…, nE - 1, nE is set to ((1<<log2CUSize)>>3), xE0 = 0, yE0 = 0, xEk+1 =xE k +8, yE j+1 =yE j It has a relationship of +8.

[0191] In this case, the samples to which the deblocking filter is applied for horizontal and vertical edges specify a set of edge sample locations (xE k , yE j For example, for a horizontal edge, (1) when the information indicating that it is a horizontal edge indicates that a deblocking filter is to be applied to the edge (bS is determined) (e.g., horEdgeFlags[xE k ][yE j ]=1), (2)(xE k+r , yE j ) (r=0,1), the (xC+xE k , yC+yE j Set p0 to (xC+xE -1) and the predicted picture is restored. k , yC+yE j ) can be set to q0, and (3) in this case the direction of the deblocking filter is vertical.

[0192] For a vertical edge, (1) when the information indicating that it is a vertical edge indicates that a deblocking filter is to be applied to the edge (bS determines that), e.g., verEdgeFlags[xE k ][yE j ]=1), (2)(xE k , yE j+r ) (r=0,1), the (xC+xE k -1, yC+yE j ) and set p0 to (xC+xE k , yC+yE j ) can be set to q0, and (3) in this case, the direction of the deblocking filter is horizontal.

[0193] Depending on the filter direction, bS is (Ek , E j ) can be determined based on. For example, bS can be determined as bS[filterDir][E k [E j .

[0194] Looking at bS derivation method 1, edges for determining bS are set for each block of the block distortion removal filter processing unit. Therefore, bS is determined at the edge that is the boundary of the block removal application unit block and also the boundary of the bS determination unit block. In bS derivation method 1, taking the case where the block distortion removal filter processing unit is an 8×8 pixel block and bS is determined in 4-pixel units as an example, edges for determining bS at the boundary of the 8×8 pixel block are set. For this purpose, nE = ((1 << log2CUSize) >> 3) and xE k+1 = xE k + 8, yE j+1 = yE j + 8 and other relationships are applied. Also, for horizontal edges, bS is set based on (xE k+r , yE j ), block distortion removal filter application samples are identified, for vertical edges, bS is set based on (Ek, yE j+r ), block distortion removal filter application samples are identified, and the r value is limited to 0 and 1.

[0195] After that, when bS determination is performed in 4×4 pixel units, bS is determined for the edge that is the boundary of the 8×8 pixel block and also the boundary of the 4×4 pixels. In other words, at the boundary of the 8×8 pixel block (block distortion removal filter processing unit block), bS is determined in 4-pixel units (bS determination unit).

[0196] On the other hand, an example of a method of determining bS for each bS determination unit and adding the condition that the bS determination unit is at the boundary of the block distortion removal filter processing unit block is as follows.

[0197] <bS Derivation Method 2>

[0198] The position of the luminance sample at the upper left side of the current block, for example, CU, is specified as (xC, yC) based on the luminance sample at the upper left side of the current picture. The variable specifying the size of the CU, which is the current block, is log2CUSize, and the vertical and horizontal edges for which bS is determined are specified by the two-dimensional arrays horEdgeFlags and verEdgeFlags. In this case, the size of the two-dimensional array is nS×nS, where nS=1< <log2CUSizeである。

[0199] (xE k , yE j ) specifies the set of edge sample locations, where k = 0, …, nE-1 and j = 0, …, nE-1, with nE being ((1<<log2CUSize)> >2), xE0=0, yE0=0, xE k+1 =xE k +4, yE j+1 =yE j It has a relationship of +4.

[0200] In this case, the samples to which the deblocking filter is applied for horizontal and vertical edges specify a set of edge sample locations (xE k , yE j For example, for a horizontal edge, (1) the information indicating that it is a horizontal edge indicates that a deblocking filter is to be applied to the edge (bS is determined) (e.g., horEdgeFlags[xE k ][yE j ]=1) and yE j When the value of %2 is 0, (2) the (xC+xE k , yC+yE j Set p0 to (xC+xE -1) and the predicted picture is restored. k , yC+yE j ) can be set to q0, and (3) in this case, the direction of the block distortion removal filter is vertical. In this case, yE j %2 is yE j It means the remainder when dividing by 2.

[0201] For vertical edges, (1) the information indicating that the edge is a vertical edge indicates that a deblocking filter is to be applied to the edge (bS is determined) (e.g., verEdgeFlags[xE k ][yE j ]=1) and xE k When the value of %2 is 0, (2) the (xC+xE k -1, yC+yE j ) and set p0 to (xC+xE k , yC+yE j ) can be set to q0, and (3) in this case, the direction of the block distortion removal filter is horizontal. In this case, xE k %2 is xE k It means the remainder when dividing by 2.

[0202] Depending on the filter direction, bS is (E k , E j ) can be determined based on the filterDir. For example, bS can be determined based on bS[filterDir][E k ][E j ] can be determined.

[0203] Like method 1, method 2 also does not perform bS determination for edges inside the block removal application unit block (8×8 pixel block). In method 2, the process of determining bS is performed in units of 4×4 pixel blocks (bS determination unit blocks), and bS is determined only when the index of the 4×4 block is an even number, that is, when the boundary of the 4×4 block is the boundary of an 8×8 block. In this case, bS at each boundary can be determined by the bS determination method described in the example of FIG. 5, or can be determined by a simpler bS determination method as described later.

[0204] 9 is a schematic diagram showing an example of a method for determining bS when the boundary of the block removal application unit block coincides with the boundary of the bS determination unit block. The example of FIG. 9 illustrates the results of applying method 1 and method 2.

[0205] As shown in FIG. 9, considering a deblocking filtering unit block 910, which is an 8×8 pixel block for a current block (eg, CU), edges located inside the block 910 do not determine bS.

[0206] On the other hand, in order to simplify the bS determination procedure, reduce the complexity, and enhance the effectiveness of the deblocking filter, it is also possible to consider a method in which a bS for only one edge among the edges for the unit block of the deblocking filter is derived and used as a representative bS for that edge among the edges of the unit block of the deblocking filter.

[0207] 10 is a diagram for explaining another example of a method for determining a representative bS value in a unit block for executing a deblocking filter. In Fig. 10, an example will be explained in which a unit block 1000 of the deblocking filter is an 8x8 pixel block, and a unit block for determining bS is a 4x4 pixel block.

[0208] 10, of two vertical edges 1010 and 1020 that are the bS determination targets in a unit block 1000 of the deblocking filter, bS is determined only for the 0th edge 1010. In other words, for each unit block of the deblocking filter, bS is calculated only for the vertical and horizontal edges of the 0th bS determination unit block, and the calculated bS is used as the representative bS for the unit block of the deblocking filter. For example, if the unit block of the deblocking filter is an 8×8 pixel block and the bS determination unit block is a 4×4 pixel block, there are four bS determination unit blocks in the unit block of the deblocking filter. Of these, bS is determined only for the vertical and horizontal edges of the 0th block (the upper left block) and used as the representative bS for the unit block of the deblocking filter.

[0209] By determining bS as in the example of Figure 10, the process of determining bS can be simplified and bS can be determined to a process that is 1 / 4 of the existing process, and the memory required to store bS can also be reduced to 1 / 4 of the existing process.

[0210] The position (edge) at which bS is determined can be determined using any one of the methods described above with reference to Figures 6 to 10. In this case, the method of determining bS at the position at which bS is set is specifically as described with reference to Figure 5.

[0211] However, the method of determining bS may also be simpler than that shown in Fig. 5. For example, even if the bS value is derived by dividing it into a range from 0 to 4 as in the example of Fig. 5, the bS value may not be divided and used in the deblocking filter process. For example, it may be possible to determine only bS>0, bS>1, or bS>2.

[0212] Therefore, a simpler bS decision tree such as the example of FIG. 5 can be used to implement a deblocking filter.

[0213] FIG. 11 is a flow chart that generally illustrates another example of a method for determining bS.

[0214] Referring to FIG. 11, first, it is determined whether block P and / or block Q is intra-coded (S1110).

[0215] When P and / or Q are intra-coded, bS for the boundary between block P and block Q is determined to be bS3 (S1120).

[0216] If P and / or Q are not intra-coded, it is determined whether or not the block P and / or the block Q includes a coefficient (a non-zero transform coefficient) (S1130). In this case, the transform coefficient may be a transform coefficient before inverse quantization is applied, or a transform coefficient after inverse quantization is applied.

[0217] In step S1130, if block P and / or block Q includes coefficients (non-zero transform coefficients), the bS value for the boundary between P and Q is determined to be bS2 (S1140).

[0218] In step S1130, if block P and / or block Q does not contain coefficients (non-zero transform coefficients), it is determined whether block P and block Q have separate reference pictures or whether block P and block Q have separate motion vectors (S1150).

[0219] In step S1150, if blocks P and Q have different reference pictures or different motion vectors, bS for the boundary between blocks P and Q is determined to be bS1 (S1160).

[0220] In other cases, ie, when a deblocking filter is not applied, bS for the boundary between blocks P and Q is set to bS0 (S1170).

[0221] Here, the bS values ​​determined in steps S1120, S1140, S1160, and S1170 are represented as bS3, bS2, bS1, and bS0, respectively, for the sake of convenience of explanation. In the example of Fig. 11, considering that the bS values ​​are divided into four types and derived, the values ​​of bS0 to bS3 can be set as bS0=0, bS1=1, bS2=2, and bS3=3 / 4, as shown in Fig. 11. In the example of Fig. 11, it is explained that bS3 is determined to be 3 / 4 in step S1120, but this is a representation that makes it easy to understand that the bS values ​​of 3 and 4 in the example of Fig. 5 are determined to be a single value of bS3 (e.g., 3) in the example of Fig. 11.

[0222] The bS decision tree can also be used to set the values ​​of the variables required for the deblocking filter. cAs a simple example, the offset is set to a particular value (eg, 2) for the largest bS value, and set to 0 for other bS values.

[0223] It is also possible to consider a method of further reducing the number of decision branches from that described in the example of Figure 11. In this case, the bS values ​​can be reduced from three (bS0, bS1, bS2) instead of four (bS0, bS1, bS2, bS3) as in the example of Figure 11, and a deblocking filter can be used.

[0224] In this case, the largest bS value, bS2, may be determined when block P and / or block Q are intra-coded, the bS value for other cases where a deblocking filter can be applied may be determined as bS1, and the bS value for other cases where a deblocking filter cannot be applied may be determined as bS0. Considering that the bS value is derived from one of the three types of bS values, the values ​​of bS0, bS1, and bS2 may be set to, for example, bS0=0, bS1=1, and bS2=2.

[0225] FIG. 12 is a flow chart for explaining a method of determining the bS value to be one of three values ​​as described above.

[0226] Referring to FIG. 12, first, it is determined whether block P and / or block Q is intra-coded (S1210).

[0227] If block P and / or block Q are intra-coded, bS for the boundary between block P and block Q is determined to be bS2 (S1220). bS2 corresponds to the bS values ​​of 3 and 4 (bS=3 / 4) in the example of Fig. 5. Since bS2 is the largest of the three bS values, the value of bS2 can be set to 2, for example.

[0228] If the blocks P and / or Q are not intra-coded, it is determined whether the blocks P and Q include non-zero coefficients (transform coefficients), whether the blocks P and Q have different reference pictures, or whether the blocks P and Q have different motion vectors (S1230). In this case, the transform coefficients may be transform coefficients before inverse quantization is applied, or transform coefficients after inverse quantization is applied.

[0229] In step S1230, if block P and block Q include non-zero coefficients (transform coefficients), or block P and block Q have different reference pictures, or block P and block Q have different motion vectors, bS for the boundary between block P and block Q is set to bS1 (S1240). bS1 corresponds to the bS value when block P and block Q are not intra-coded and when a deblocking filter is applied, and corresponds to the bS values ​​of 1 and 2 (bS=1 / 2) in the example of FIG. 5. Since the intermediate value of the three bS values ​​is bS1, the value of bS1 can be set to, for example, 1.

[0230] In other cases, i.e., when the block removal filter is not applied, bS is set to bS0 (S1240). bS0 is the bS value when the block removal filter is not applied, and corresponds to the bS value being 0 (bS=0) in the example of Fig. 5. Since bS0 is the smallest of the three bS values, the value of bS0 can be set to 0, for example.

[0231] The values ​​of the variables required for the deblocking filter can also be set using the bS decision tree. c As a simple example, the offset is set to a particular value (eg, 2) for the largest bS value, and set to 0 for other bS values.

[0232] Fig. 13 is a flow chart for explaining another method for determining the bS value to be one of three values. In the bS determination method (bS decision tree) explained in Fig. 12, an example is shown in which the three bS values ​​(bS1, bS2, bS3) are clearly set to 0, 1, and 2 for the sake of understanding the invention.

[0233] Referring to FIG. 13, first, it is determined whether block P and / or block Q is intra-coded (S1310).

[0234] If block P and / or block Q are intra-coded, the bS value for the boundary between block P and block Q is determined to be 2 (S1320). A bS of 2 corresponds to the bS values ​​of 3 and 4 (bS=3 / 4) in the example of FIG.

[0235] If the blocks P and / or Q are not intra-coded, it is determined whether the blocks P and Q include non-zero coefficients (transform coefficients), whether the blocks P and Q have different reference pictures, or whether the blocks P and Q have different motion vectors (S1330). In this case, the transform coefficients may be transform coefficients before inverse quantization is applied, or transform coefficients after inverse quantization is applied.

[0236] In step S1330, if blocks P and Q contain non-zero coefficients (transform coefficients), or blocks P and Q have different reference pictures, or blocks P and Q have different motion vectors, the bS value for the boundary between blocks P and Q is set to 1 (S1340). When bS is 1, blocks P and Q are not intra-coded, and the bS value for the case where a deblocking filter is applied corresponds to the bS values ​​of 1 and 2 (bS=1 / 2) in the example of FIG. 5.

[0237] In other cases, i.e., when the block removal filter is not applied, the bS value is set to 0 (S1340). When the bS value is 0, it corresponds to the bS value for the case where the block removal filter is not applied, and corresponds to the bS value of 0 (bS=0) in the example of FIG.

[0238] The bS decision tree can also be used to set the values ​​of the variables required for the deblocking filter. c As a simple example, the offset is set to a particular value (eg, 2) for the largest bS value, and set to 0 for other bS values.

[0239] Even if the bS value is set to one of three values ​​as in Figures 12 and 13, the decision steps of the decision tree do not need to be limited to two steps. Even if more or fewer decision steps are performed, the five types of bS values ​​used in the decision method of Figure 5 can be reduced and applied. For example, in Figures 12 and 13, the decision on whether blocks P and Q contain non-zero coefficients (transform coefficients), whether P and Q have different reference pictures, or whether blocks P and Q have different motion vectors, which are determined in one step, can be performed separately.

[0240] FIG. 14 is a flow chart illustrating another method for determining the bS value to be one of three values.

[0241] Referring to FIG. 14, first, it is determined whether block P and / or block Q is intra-coded (S1410).

[0242] If block P and / or block Q is intra-coded, the bS value for the boundary between block P and block Q is determined to be 2 (S1420). A bS of 2 corresponds to the bS values ​​of 3 and 4 (bS=3 / 4) in the example of FIG.

[0243] If the block P and / or the block Q is not intra-coded, it is determined whether the block P and the block Q include a non-zero coefficient (transform coefficient) (S1430). In this case, the transform coefficient may be a transform coefficient before inverse quantization is applied or a transform coefficient after inverse quantization is applied.

[0244] If blocks P and Q contain non-zero coefficients (transform coefficients), the bS value for the boundary between blocks P and Q is set to 1 (S1440). In this case, a bS value of 1 indicates that blocks P and Q are not intra-coded and a deblocking filter is applied, which corresponds to a bS value of 2 in the example of FIG.

[0245] If blocks P and Q do not contain non-zero coefficients (transform coefficients), it is determined whether blocks P and Q have different reference pictures or whether blocks P and Q have different motion vectors (S1450).

[0246] In step S1450, if block P and block Q have different reference pictures or different motion vectors, the bS value for the boundary between block P and block Q is set to 1 (S1460). A bS value of 1 indicates that block P and block Q are not intra-coded and a deblocking filter is applied, which corresponds to the bS value of 1 in the example of FIG.

[0247] In other cases, i.e., when the block removal filter is not applied, the bS value is set to 0 (S1470). When the bS value is 0, it corresponds to the bS value of 0 (bS=0) in the example of FIG. 5 as the bS value for the case when the block removal filter is not applied.

[0248] The bS decision tree can also be used to set the values ​​of the variables required for the deblocking filter. cAs an example, it is simply shown that the offset is set to a specific value (for example, 2) for the largest bS value and set to 0 for other bS values.

[0249] Hereinafter, when simplifying the value of bS to be derived by any one of three types of values, the method for deriving the bS value will be specifically described.

[0250] First, to assist in understanding the invention, as shown in FIG. 5 or FIG. 11, the method when the value of bS is derived by any one of five values will be described first.

[0251] <Method for Deriving bS by Any One of Five Types of Values>

[0252] First, identify the edge where bS is determined. The identification of the edge where bS is determined can be performed using any one of the methods described with reference to FIGS. 6 to 10.

[0253] As described with reference to FIGS. 6 to 10, by identifying the edge where bS is determined, the reference position (xE k , yE j ) for determining bS and the samples p0 and q0 on the left and right of the edge where bS is determined, the direction of the block distortion removal filter, etc. are derived. p0 and q0 are determined based on (xE k , yE j ) as described above.

[0254] Based on the derived block distortion removal filter direction, the variable bS[filterDir][xE k [yE j representing the boundary filter processing intensity is determined. For example, when the value of filterDir is 1, it indicates vertical filter processing, and thus bS for a horizontal edge is derived. When the value of filterDir is 0, it indicates horizontal filter processing, and thus bS for a vertical edge is derived. xE k and yE jspecifies the edge that determines bS. For example, the edge that determines bS is (xC+xE k , yC+yE j p0 is set to -1) and p1 is set to (xC+xE k , yC+yE j ) and for vertical edges, (xC+xE k -1, yC+yE j ), and p0 is set to (xC+xE k , yC+yE j ) can be specified as the boundary between

[0255] bS[filterDir][xE k ][yE j The value of ] can be derived as follows:

[0256] (1) When the block edge to be determined as bS is a CU edge and the sample p0 or q0 belongs to a CU coded in intra prediction mode, bS, that is, bS[filterDir][xE k ][yE j ] value is set to 4.

[0257] (2) When sample p0 or q0 belongs to a CU coded in intra prediction mode, but the block edge for which bS is determined is not a CU edge, bS[filterDir][xE k ][yE j ] value is set to 3.

[0258] (3) When the block edge to be determined as bS is a TU edge and the sample p0 or q0 belongs to a TU that includes a transform coefficient level that is not 0, bS[filterDir][xE k ][yE j ] value is set to 2.

[0259] (4) bS[filterDir][xE when a block distortion removal filter is applied k ][yE jThe value is set to 1. For example, in the examples of FIGS. 5, 11, 12, 13, and 14, for the sake of convenience of explanation, when the sample p0 or q0 does not belong to the block to which the intra prediction is applied and the block removal filter is applied, the cases where the block P and / or the block Q include non-zero transform coefficients, and the cases where the block P and the block Q have different motion vectors or have different reference pictures are taken as examples. However, the non-zero bS can be set in various other cases. For example, (i) when the block P and the block Q have different numbers of motion vectors from each other, (ii) when there is a difference of 4 or more in absolute value between the vertical components or the horizontal components of the motion vector used for the block P and the motion vector used for the block Q in units of 1 / 4 pixel, bS[filterDir][xE k [yE j value can be set to 1.

[0260] (5) If it is not the case of (1) to (4), that is, when the block distortion removal filter is not applied, bS[filterDir][xE k [yE j value is set to 0.

[0261] On the other hand, different from the case of deriving the bS value by any one of five values, as shown in FIGS. 12 to 14, the bS value can be derived by any one of three values, and the bS can be derived simply with lower complexity.

[0262] Next, an example of a method of deriving the bS value by any one of three values will be described.

[0263] <Method 1 for deriving bS by any one of three values>

[0264] Identify the edge where bS is determined. The identification of the edge where bS is determined can be executed using any one of the methods described with reference to FIGS. 6 to 10.

[0265] The reference position (xE k , yE j ), the left and right samples of the edge, p0 and q0, which determine bS, the direction of the deblocking filter, etc. are derived.

[0266] The variable bS[filterDir][xE k ][yE j For example, a filterDir value of 1 indicates vertical filtering, and thus bS for horizontal edges is derived. A filterDir value of 0 indicates horizontal filtering, and thus bS for vertical edges is derived. k and yE j specifies the edge that determines bS. For example, the edge that determines bS is (xC+xE k , yC+yE j p0 is set to -1) and p1 is set to (xC+xE k , yC+yE j ) and for vertical edges, (xC+xE k -1, yC+yE j ), and p0 is set to (xC+xE k , yC+yE j ) can be specified as the boundary between

[0267] bS[filterDir][xE k ][yE j The value of ] can be derived as follows:

[0268] (1) When sample p0 or q0 belongs to a CU coded in intra prediction mode, bS, i.e., bS[filterDir][xE k ][yE j ] value is set to 2.

[0269] (2) When the block edge to be determined for bS is a TU edge and the sample p0 or q0 belongs to a TU containing a non-zero transform coefficient level, bS[filterDir][xE k [yE j value is set to 1.

[0270] (3) Otherwise, when the block distortion removal filter is applied, bS[filterDir][xE k [yE j value is set to 1. For example, in relation to the drawings regarding the previous bS decision tree structure, as an example, (i) when the PU containing p0 or the PU containing q0 has different reference pictures or has a different number of motion vectors, (ii) when the absolute value difference between the vertical components or the absolute value difference between the horizontal components of the motion vector used for the PU containing p0 and the motion vector used for the PU containing q0 is 4 or more in 1 / 4 pixel units, (iii) when two motion vectors are used in the PU containing p0 and two motion vectors are used in the PU containing q0, and for at least one pair of motion vectors corresponding to the same reference picture, the absolute value difference between the vertical components or the absolute value difference between the horizontal components of the motion vectors is 4 or more in 1 / 4 pixel units, etc., bS[filterDir][xE k [yE j value can be set to 1.

[0271] (4) If not in cases (1) to (3), that is, when the block distortion removal filter is not applied, bS[filterDir][xE k [yE j value is set to 0.

[0272] On the other hand, as described above, instead of deriving bS in 4 steps, the same bS value can be derived in the same step. Another example of a method for deriving the bS value to one of the three types of bS values is as follows.

[0273]

[0274] Identifying the edges along which bS is determined Identifying the edges along which bS is determined can be performed using any one of the methods described with reference to Figures 6 to 10 .

[0275] The reference position (xE k , yE j ), the left and right samples of the edge, p0 and q0, which determine bS, the direction of the deblocking filter, etc. are derived.

[0276] Depending on the derived deblocking filter direction, the variable bS[filterDir][xE k ][yE j For example, a filterDir value of 1 indicates vertical filtering, and thus bS for horizontal edges is derived. A filterDir value of 0 indicates horizontal filtering, and thus bS for vertical edges is derived. k and yE j specifies the edge that determines bS. For example, the edge that determines bS is (xC+xE k , yC+yE j p0 is set to -1) and p1 is set to (xC+xE k , yC+yE j ) and for vertical edges, (xC+xE k -1, yC+yE j ), and p0 is set to (xC+xE k , yC+yE j ) can be specified as the boundary between

[0277] bS[filterDir][xE k ][yE j The value of ] can be derived as follows:

[0278] (1) When sample p0 or q0 belongs to a CU coded in intra prediction mode, bS, i.e., bS[filterDir][xE k ][yE j ] value is set to 2.

[0279] (2) bS[filterDir][xE when a block distortion removal filter is applied k ][yE j ] value is set to 1. For example, when the block edge for which bS is determined is a TU edge, and (i) sample p0 or q0 belongs to a TU including a transform coefficient level that is not 0, (ii) the PU including p0 and the PU including q0 have different reference pictures or have different numbers of motion vectors, (iii) the difference in absolute value between the vertical components or the horizontal components of the motion vector used in the PU including p0 and the motion vector used in the PU including q0 is 4 or more in 1 / 4 pixel units, (iv) when two motion vectors are used in the PU including p0 and two motion vectors are used in the PU including q0, the difference in absolute value between the vertical components or the horizontal components of the motion vectors for at least one pair of motion vectors corresponding to the same reference picture is 4 or more in 1 / 4 pixel units, etc., bS[filterDir][xE k ][yE j ] value can be set to 1.

[0280] (3) If neither (1) nor (2) applies, i.e., if the block distortion removal filter is not applied, then bS[filterDir][xE k ][yE j ] Set the value to 0.

[0281] Meanwhile, the case where the bS value is derived by 1 may not be limited to the case where the block edge for which the bS is determined is an edge of a TU. Another example of a method for deriving the bS value by one of three values ​​is as follows.

[0282] <Method 3 for deriving <bS> using one of three values>

[0283] Identify the edge where <bS> is determined. The identification of the edge where <bS> is determined can be executed using any one of the methods described with reference to FIGS. 6 to 10.

[0284] Based on the identified edge where <bS> is determined, the reference position (xE k , yE j ) for determining <bS>, the samples p0 and q0 on the left and right of the edge for determining <bS>, the direction of the block distortion removal filter, etc. are derived.

[0285] Based on the derived block distortion removal filter direction, the variable bS[filterDir][xE k [yE j representing the boundary filter processing intensity is determined. For example, when the value of filterDir is 1, it indicates vertical filter processing, and thus bS for a horizontal edge is derived. When the value of filterDir is 0, it indicates horizontal filter processing, and thus bS for a vertical edge is derived. xE k and yE j identify the edge where <bS> is determined. For example, for a horizontal edge, the edge where <bS> is determined can be identified as the boundary between p0 set to (xC + xE k , yC + yE j - 1) and q0 set to (xC + xE k , yC + yE j ). For a vertical edge, it can be identified as the boundary between p0 set to (xC + xE k - 1, yC + yE j ) and q0 set to (xC + xE k , yC + yE j ).

[0286] The value of bS[filterDir][xE k [yE j can be derived as follows.

[0287] (1) When sample p0 or q0 belongs to a CU coded in intra prediction mode, bS, i.e., bS[filterDir][xE k ][yE j ] value is set to 2.

[0288] (2) bS[filterDir][xE when a block distortion removal filter is applied k ][yE j ] value is set to 1. For example, in the following cases, bS[filterDir][xE] is set to 1 when (i) the block edge for which bS is determined is a TU edge, and sample p0 or q0 belongs to a TU including a transform coefficient level that is not 0, (ii) the PU including p0 and the PU including q0 have different reference pictures or different numbers of motion vectors, (iii) the difference in absolute value between the vertical components or the horizontal components of the motion vectors used in the PU including p0 and the PU including q0 is 4 or more in 1 / 4 pixel units, or (iv) when two motion vectors are used in the PU including p0 and two motion vectors are used in the PU including q0, the difference in absolute value between the vertical components or the horizontal components of the motion vectors for at least one pair of motion vectors corresponding to the same reference picture is 4 or more in 1 / 4 pixel units. k ][yE j ] value can be set to 1.

[0289] (3) If neither (1) nor (2) applies, i.e., if the block distortion removal filter is not applied, then bS[filterDir][xE k ][yE j ] Set the value to 0.

[0290] In the method of deriving bS using one of three values, the fact that the reference pictures of the PU including p0 and the PU including q0 are different is determined by what picture is referenced, regardless of what reference picture list is used or whether the reference picture indexes of the reference picture lists are the same.

[0291] On the one hand, although the luminance samples have been described so far, as described above, the derived bS can also be applied to the color difference samples.

[0292] As described, when reducing the number of bS values to reduce complexity and simply deriving bS, it is also necessary to modify and apply the block distortion removal filter method for the color difference components.

[0293] An example of a method of deriving bS using one of five values and applying a block distortion removal filter to the color difference components (color difference samples) is as follows.

[0294] <Method 1 of applying a block distortion removal filter to color difference samples>

[0295] Variable t c is specified. The variable t c is a value that quantifies the block distortion according to the quantization level, and t c can be derived based on the offset or set to be mapped on a predetermined table based on other block removal parameters.

[0296] For example, as in described later, t c can be determined by the quantization parameter Q, β as a reference value for determining whether to apply the block distortion removal filter, etc.

[0297] For the edge of the color difference sample, when bS is derived using values from 0 to 4 as described in <Method of deriving bS using one of five values>, t c value can be specified as follows. (1) When the bS value is greater than 2, when the average value of the quantization parameters for blocks P and Q considering the round value is qP L , t c is determined to be the value corresponding to the quantization parameter Q = Clip(0, 55, qP L ). (2) When the bS value is 2 or less, tc is the quantization parameter Q=qP L The value is determined to correspond to

[0298] shows Q, β, t c 13 shows an example of a correspondence relationship between [Table 1]

[0299] In this case, t c =t c The relationship may be β´*(1<<(BitDepthY-8)), or β=β´*(1<<(BitDepthY-8)).

[0300] A deblocking filter for the chrominance samples can be performed with parameters specified based on the values ​​in Table 1.

[0301] First, for vertical edges, a deblocking filter is applied based on each chrominance sample position (xC+xB, yC+yB+k) as follows, where k=0,...,3.

[0302] (1) In blocks P and Q that are bounded by a vertical edge, the chrominance sample p i and chrominance sample q of block Q i (i=0,1) is q i =s'[xC+xB+i, yC+yB+k], pi=s'[xC+xB-i-1, yC+yB+k].

[0303] (2) When bS is greater than 2, (i) the color difference sample value p i and q i The filtering procedure is performed for (i=0,1). (ii) The filtered sample values ​​p0' and q0' replace the corresponding sample positions in the sample array as follows: s'[xC+xB, yC+yB+k]=q0', s'[xC+xB, yC+yB+k]=p0'

[0304] For horizontal edges, we perform a chrominance deblocking filter as follows, with k=0,...,3:

[0305] (1) Color difference sample p of block P i and chrominance sample q of block Q i (i=0,1) is q i =s'[xC+xB+i, yC+yB+k], p i =s'[xC+xB-i-1, yC+yB+k].

[0306] (2) When bS is greater than 2, (i) the color difference sample p i and q i The filtering procedure is performed for (i=0,1). (ii) The filtered samples p0' and q0' replace the corresponding samples in the sample array as follows: s'[xC+xB, yC+yB+k]=q0', s'[xC+xB, yC+yB+k]=p0'

[0307] For horizontal edges, we perform a deblocking filter as follows:

[0308] (1) In blocks P and Q that are bounded by horizontal edges, the chrominance sample p i and chrominance sample q of block Q i (i=0,1) is q i =s'[xC+xB+k, yC+yB+i], p i = s'[xC+xB+k, yC+yB-i-1], where k can have values ​​of 0,...,3.

[0309] (2) When bS is greater than 2, (i) for each color difference sample p i and q i Apply a deblocking filter to (i=0,1). (ii) The filtered samples p0' and q0' replace the corresponding samples in the sample array as follows: s'[xC+xB, yC+yB+k]=q0', s'[xC+xB-1, yC+yB+k]=p0'

[0310] In the above-described filter processing process, when the value of bS is greater than 2, the sample to be filter-processed is derived as shown in the following <Equation 5>.

[0311] <Equation 5> Δ = Clip3(-t C , t C , ((((q0 - p0) << 2) + p1 - q1 + 4) >> 3)) p0’ = Clip1 C (p0 + Δ) q0’ = Clip1 C (q0 - Δ)

[0312] On the other hand, when reducing the number of bS values to lower the complexity and applying the simply-derived bS, the block distortion removal filter method for chrominance samples can be applied as follows.

[0313] <Method 2 of Applying a Block Distortion Removal Filter to Chrominance Samples>

[0314] The variable t c is specified. The variable t c is a value that quantifies the block distortion according to the quantization level, and t c can be derived based on the offset or set to be mapped on a predetermined table based on other block removal parameters.

[0315] For example, as shown in described later, t c can be determined by the quantization parameter Q, β as a reference value for determining whether to apply the block distortion removal filter, etc.

[0316] For the edge of the chrominance sample, when bS is derived by values from 0 to 2 as described in <Method of Deriving bS by Any One of Three Values>, t c(1) When the bS value is greater than 2, the average value of the quantization parameter for blocks P and Q taking into account the approximate values ​​is set to qP L Then, t c is the quantization parameter Q=Clip(0,55,qP L (2) When the bS value is 2 or less, t c is the quantization parameter Q=qP L The value is determined to correspond to

[0317] shows Q, β, t c 1 shows an example of a correspondence relationship between [Table 2]

[0318] In this case, t c =t c ´*(1<<(BitDepthY-8)), β=β´*(1<<(BitDepthY-8)).

[0319] A deblocking filter for the chrominance samples can also be implemented with parameters specified based on the values ​​in Table 2.

[0320] First, for vertical edges, a deblocking filter is applied based on each chrominance sample position (xC+xB, yC+yB+k) as follows, where k=0,...,3.

[0321] (1) In blocks P and Q that are bounded by vertical edges, the chrominance sample p i and chrominance sample q of block Q i (i=0,1) is q i =s'[xC+xB+i, yC+yB+k], p i =s'[xC+xB-i-1, yC+yB+k].

[0322] (2) When bS is greater than 1, (i) the color difference sample value p i and qi The filtering procedure is performed for (i=0,1). (ii) The filtered sample values ​​p0' and q0' replace the corresponding sample positions in the sample array as follows: s'[xC+xB, yC+yB+k]=q0', s'[xC+xB, yC+yB+k]=p0'

[0323] For horizontal edges, we perform a chrominance deblocking filter as follows, with k=0,...,3:

[0324] (1) Color difference sample p of block P i and chrominance sample q of block Q i (i=0,1) is q i =s'[xC+xB+i, yC+yB+k], p i =s'[xC+xB-i-1, yC+yB+k].

[0325] (2) When bS is greater than 1, (i) the color difference sample p i and q i The filtering procedure is performed for (i=0,1). (ii) The filtered samples p0' and q0' replace the corresponding samples in the sample array as follows: s'[xC+xB, yC+yB+k]=q0', s'[xC+xB, yC+yB+k]=p0'

[0326] For horizontal edges, we perform a deblocking filter as follows:

[0327] (1) In blocks P and Q that are bounded by horizontal edges, the chrominance sample p i and chrominance sample q of block Q i (i=0,1) is q i =s'[xC+xB+k, yC+yB+i], p i = s'[xC+xB+k, yC+yB-i-1], where k can have values ​​of 0,...,3.

[0328] (2) When bS is greater than 1, (i) for each color difference sample p i and q i Apply a deblocking filter to (i=0,1). (ii) The filtered samples p0' and q0' replace the corresponding samples in the sample array as follows: s'[xC+xB, yC+yB+k]=q0', s'[xC+xB-1, yC+yB+k]=p0'

[0329] In the above filtering process, when the value of bS is greater than 1, the filtered sample is derived as shown in Equation 6 below.

[0330] <Formula 6> Δ = Clip3(-t C , t C , ( ( ( ( q0- p0) << 2 ) + p1- q1+ 4 ) >> 3 ) ) p0' = Clip1 C ( p0 + Δ ) q0' = Clip1 C ( q0- Δ )

[0331] Meanwhile, one of the main causes of block distortion at block boundaries is block-based motion compensation, and overlapped block motion compensation (OBMC) can be used to overcome this.

[0332] When OBMC is used, the bS decision process described above must also be modified to suit OBMC. For example, when motion information between blocks is different, blocking artifacts can be severe, so one of the criteria for determining the bS value of 0 or 1 is the similarity of motion information. However, when OBMC technology is used, blocking artifacts are reduced at the boundaries of the areas where motion compensation is performed. As a result, unnecessary deblocking filters can be reduced, but the bS decision process (bS decision tree) must be modified to reflect this.

[0333] FIG. 15 is an example of a bS decision tree applied when OMBC is applied, and is a flow chart for explaining a method of determining bS in general.

[0334] Referring to FIG. 15, first, it is determined whether block P and / or block Q is intra-coded (S1500).

[0335] If block P and / or block Q are intra-coded, it is determined whether the boundary of block Q, i.e., the boundary between block P and block Q, is a boundary of coded blocks (S1510). In this case, the coded blocks include CUs and LCUs.

[0336] In step S1510, if the boundary between blocks P and Q is a coding block boundary, the value of bS for the boundary between blocks P and Q is determined to be bS4 (eg, bS4=4) (S1520).

[0337] In step S1520, if the boundary between blocks P and Q is not a coding block boundary, the value of bS for the boundary between blocks P and Q is determined to be bS3 (eg, bS3=3) (S1530).

[0338] In step S1500, if blocks P and Q are not intra-coded, it is determined whether blocks P and Q are within a rectangular or asymmetric partition within a single coding block (e.g., CU) (S1540).

[0339] In step S1540, if block P and block Q are not in a rectangular or asymmetric partition in a single coding block (e.g., CU), it is determined whether block P and / or block Q include coefficients (non-zero transform coefficients) (S1550). In this case, the transform coefficients may be transform coefficients before inverse quantization is applied or transform coefficients after inverse quantization is applied.

[0340] In step S1550, if block P and / or block Q includes coefficients (non-zero transform coefficients), bS for the boundary between block P and block Q is determined to be bS2 (eg, bS2=2) (S1560).

[0341] If block P and / or block Q does not include any coefficients (non-zero transform coefficients) in step S1550, it is determined whether block P and block Q have different reference pictures or motion vectors (S1570).

[0342] In step S1570, if block P and block Q have different reference pictures or motion vectors, bS for the boundary between block P and block Q is determined to be bS1 (eg, bS1=1) (S1580).

[0343] In other cases, i.e., when the deblocking filter is not applied, bS is set to bS0 (e.g., bS0=0) (S1590). Cases where bS is set to bS0 include cases where blocks P and Q are not in a rectangular or asymmetric partition in a single coding block (e.g., CU) in step S1540, or where blocks P and Q do not have different reference pictures or motion vectors in step S1570.

[0344] 15, the relationship bS4>bS3>bS2>bS1>bS0 is maintained as in the previous example regarding bS determination. Therefore, the values ​​of bS0 to bS4 can be set as bS4=4, bS3=3, bS2=2, bS1=1, and bS0=0 as in the above example and illustrated.

[0345] Also, as in the previous example, the bS decision tree can be used to set the values ​​of the variables required for the deblocking filter. In FIG. 15, for the largest 2bS value, t c Set offset to a specific value (e.g., 2) and set t for other bS values. c Here is a simple example of setting the offset to 0:

[0346] In the example of Figure 15, when blocks P and Q are in the same coding block (e.g., CU) and are in a rectangular partition (e.g., a predictive block, PU, ​​etc.) or in an asymmetric partition (e.g., a predictive block, PU, ​​etc.), the value of bS for the boundary between blocks P and Q can be determined to be 0.

[0347] Alternatively, when blocks P and Q are in the same coding block (e.g., CU) and are in a rectangular partition (e.g., a prediction block, PU, ​​etc.) or in an asymmetric partition (e.g., a prediction block, PU, ​​etc.), when the difference between the motion information of block P and the motion information of block Q is large, the bS value for the boundary between blocks P and Q can be determined to be 1, and when the difference between the motion information of block P and the motion information of block Q is small, the bS value for the boundary between blocks P and Q can be determined to be 0.

[0348] FIG. 16 is another example of a bS decision tree applied when OMBC is applied, and is a flow chart for generally explaining a method of determining bS.

[0349] Referring to FIG. 16, first, it is determined whether P and / or Q are intra-coded (S1600).

[0350] If block P and / or block Q are intra-coded, it is determined whether the boundary of block Q, i.e., the boundary between block P and block Q, is a boundary of coded blocks (S1610). In this case, the coded blocks include CUs and LCUs.

[0351] In step S1610, if the boundary between blocks P and Q is a coding block boundary, the value of bS for the boundary between blocks P and Q is determined to be bS4 (eg, bS4=4) (S1620).

[0352] In step S1620, if the boundary between blocks P and Q is not a coding block boundary, the value of bS for the boundary between blocks P and Q is determined to be bS3 (eg, bS3=3) (S1630).

[0353] In step S1600, if blocks P and Q are not intra-coded, it is determined whether blocks P and Q are within a rectangular or asymmetric partition within a single coding block (e.g., CU) (S1640).

[0354] In step S1640, when block P and block Q are not in a rectangular or asymmetric partition in a single coding block (e.g., CU), it is determined whether block P and / or block Q include coefficients (non-zero transform coefficients) (S1650). In this case, the transform coefficients may be transform coefficients before inverse quantization is applied or transform coefficients after inverse quantization is applied.

[0355] In step S1650, if block P and / or block Q includes coefficients (non-zero transform coefficients), bS for the boundary between block P and block Q is determined to be bS2 (eg, bS2=2) (S1660).

[0356] In step S1640, if blocks P and Q are within a rectangular or asymmetric partition within a single coding block (e.g., a CU), or in step S1650, if blocks P and / or Q do not contain coefficients (non-zero transform coefficients), it is determined whether blocks P and Q have different reference pictures or motion vectors (S1670).

[0357] In step S1670, if block P and block Q have different reference pictures or motion vectors, bS for the boundary between block P and block Q is determined to be bS1 (eg, bS1=1) (S1680).

[0358] In other cases, that is, when the block removal filter is not applied, bS is set to bS0 (eg, bS0=0) (S1690).

[0359] 16, similarly to the previous example regarding bS determination, the relationship bS4>bS3>bS2>bS1>bS0 is maintained. Therefore, as shown in the example of values ​​of bS0 to bS4 and in the figure, it is possible to set bS4=4, bS3=3, bS2=2, bS1=1, and bS0=0.

[0360] As described above, in the example of Figure 16, when blocks P and Q are in the same coding block (e.g., CU) and are in a rectangular partition (e.g., a predictive block, PU, ​​etc.) or in an asymmetric partition (e.g., a predictive block, PU, ​​etc.), the bS value for the boundary between blocks P and Q can be determined to be bS1 (e.g., bS = 1).

[0361] Also, as in the previous example, the bS decision tree can be used to set the values ​​of the variables required for the deblocking filter. In FIG. 16, for the largest 2bS value, t c Set offset to a specific value (e.g., 2) and set t for other bS values. c Here is a simple example of setting the offset to 0:

[0362] On the other hand, if block P and / or block Q are intra-coded, it may not be necessary to distinguish the value of bS. For example, as in the examples of FIG. 5, FIG. 15, or FIG. 16, it is determined whether a target boundary in an I slice (intra-coded slice) is a boundary of a coding block (e.g., a CU), and if it is a boundary of a coding block, bS is determined to be 4, and if it is another boundary, bS is determined to be 3, so that the value of bS for all I slices is ultimately 3 or 4.

[0363] In relation to this, when a method for reducing the complexity by modifying the bS decision tree is applied as in Figures 12 to 14, it may be simply applied by considering whether the value of bS is greater than 0 or greater than 1 or 2. Therefore, it may not be necessary to distinguish whether the value of bS is 3 or 4.

[0364] FIG. 17 is a diagram that illustrates generally one example of a method for determining bS and applying a deblocking filter.

[0365] Referring to FIG. 17, a bS is determined to apply a block distortion removal filter (S1710), block-based filter processing on / off is determined based on the determined bS (S1720), and it is determined whether to apply a strong filter or a weak filter for a given bS (S1730), and filter processing is performed (S1740).

[0366] It can be seen that in the example of FIG. 17, the method of applying the deblocking filter is the same as or similar to the method described above with reference to FIG.

[0367] In this case, in the bS determination step (S1710), if block P and / or block Q are intra-coded, as in FIG. 5, FIG. 15, or FIG. 16, the bS value can also be determined by distinguishing whether the target boundary is a boundary of a coded block.

[0368] 18 is a diagram for explaining another example of a method for determining bS and applying a deblocking filter. Unlike FIG. 17, in FIG. 18, when block P and / or block Q are intra-coded (in the case of an I slice), bS is not additionally partitioned and determined.

[0369] Referring to FIG. 18, it is determined whether block P and / or block Q are intra-coded (I slice) in order to apply a deblocking filter (S1810).

[0370] If block P and / or block Q are not intra-coded, then the general step of determining bS is performed (S1820), as in the example of FIG.

[0371] If block P and / or block Q is intra-coded (I slice), unlike the example of FIG. 17, bS is determined to be one value (for example, 4) (S1830).

[0372] Next, the block-based filter process on / off is determined based on the determined bS (S1840), and it is determined whether to apply a strong filter or a weak filter to the given bS (S1450), and the filter process is executed (S1860).

[0373] In addition to the example of Figure 18, as another method of modifying and applying the deblocking filter method described above, it is possible to consider modifying the method using representative bS described in the example of Figure 6 to execute the deblocking filter.

[0374] In the example of FIG. 6, when deblocking filtering is performed in units of 8×8 pixel blocks, the method of using the larger bS of two bSs determined in units of 4×4 pixels as the representative bS has been described.

[0375] FIG. 19 is a flow chart for explaining an example of a method for determining the representative bS.

[0376] Referring to FIG. 19, in order to select a representative bS, the sizes of bS1 and bS2 are compared in the unit block of the deblocking filter (S1910).

[0377] In step S1910, when bS1 is greater than bS2, the representative bS is determined to be bS1 (S1920). Conversely, in step S1910, when bS2 is greater than bS1, the representative bS is determined to be bS2 (S1930).

[0378] bS1 and bS2 may be bS for two vertical edges or bS for two horizontal edges in a unit block of the deblocking filter. The method of Fig. 15 can be used to determine a representative bS for a horizontal edge in a deblocking filter process for a horizontal edge after being performed in a deblocking filter process for a vertical edge and used to determine a representative bS for a horizontal edge.

[0379] The filter processor can execute a deblocking filter using the determined representative bS.

[0380] The example of Fig. 19 illustrates a method of using a bS having a large value as the representative bS, as in the example of Fig. 6. Alternatively, the method of determining the representative bS may be different in order to reduce excessive deblocking filters and reduce the amount of calculation required for filter processing.

[0381] FIG. 20 is a flow chart for explaining another example of a method for determining the representative bS.

[0382] Referring to FIG. 20, in order to select a representative bS, the sizes of bS1 and bS2 are compared in the unit block of the deblocking filter (S2010).

[0383] In step S2010, when bS1 is smaller than bS2, the representative bS is determined to be bS1 (S2020). Conversely, when bS2 is smaller than bS1 in step S2010, the representative bS is determined to be bS2 (S2030).

[0384] bS1 and bS2 may be bS for two vertical edges or bS for two horizontal edges in a unit block of the deblocking filter. The method of Fig. 20 can also be used to determine a representative bS for a horizontal edge by being executed in a deblocking filter process for a vertical edge and then to determine a representative bS for a horizontal edge by being executed in a deblocking filter process for a horizontal edge.

[0385] Using the determined representative bS, the filter processor can execute a deblocking filter.

[0386] Meanwhile, even if the bS value is derived and applied based on any one of five values ​​as described with reference to Figures 17 and 18, when an actual deblocking filter is executed, it can only be determined whether the bS value is greater than 0 or greater than 2. Therefore, when there are only three distinct bS values, the deblocking filter can be effectively executed according to the characteristics of a pixel or block.

[0387] FIG. 21 is a flow chart that illustrates in schematic form another method for simplifying the bS decision tree (bS decision method).

[0388] Referring to FIG. 21, first, it is determined whether P and / or Q are intra-coded (S2110).

[0389] If block P and / or block Q is intra-coded, the value of bS for the boundary between block P and block Q is determined to be 2 (S2120).

[0390] If block P and / or block Q are not intra-coded, it is determined whether block P and block Q contain non-zero coefficients (transform coefficients), whether block P and block Q have different reference pictures, or whether block P and block Q have different motion vectors (S2130).

[0391] In step S2130, if blocks P and Q contain non-zero coefficients (transform coefficients), or P and Q have different reference pictures, or blocks P and Q have different motion vectors, the value of bS for the boundary between blocks P and Q is set to 1 (S2140).

[0392] In other cases, that is, when the block removal filter is not applied, the value of bS is set to 0 (S2140).

[0393] In other words, when the bS value is 0, which means that no deblocking filter is applied, P and Q are all coded in inter prediction mode and have similar motion information. In this case, similar motion information means that the reference picture is the same and the difference between each component of the motion vector is less than 4 (for example, the difference between the x components of the motion vector is less than 4 and the difference between the y components is also less than 4).

[0394] In this case, even if the coded block flag (cbf) for blocks P and Q is not 0, i.e., blocks P and Q have non-zero transform coefficients, if blocks P and Q are predicted in inter prediction mode and have similar motion information, the bS value may be determined to be 0. In other cases, i.e., when the motion information is not similar or blocks P and / or Q are coded in intra prediction mode, bS may be determined to be 1 or 2.

[0395] However, when blocks P and Q have non-zero transform coefficients (when the value of cbf is not 0), the motion information of blocks P and Q is similar and application of the deblocking filter may be necessary even if bS is determined to be 0. This is because if the motion information is similar when non-zero transform coefficients are present and application of the deblocking filter is precluded, subjective loss to the user and objective loss of data may occur.

[0396] Therefore, it is possible to strictly determine when the value of bS becomes 0 as follows:

[0397] For example, as described above, in FIG. 21, the reference picture of two blocks P and Q through an edge is the same, and the difference between the motion vector components of block P and block Q is less than 4. Therefore, the motion information is determined to be similar. P and the motion vector MV of block Q Q On the other hand, even if the difference between one component becomes 4 or more, bS is no longer 0. That is, MV P x component MV p0 and MV Q x component MV Q0 The difference between is 4 or more, or MV P y component MV P1 and MV Q y component MV Q1 When the difference between is 4 or more, bS is set to a non-zero value, for example 1.

[0398] Therefore, instead of judging whether the difference between the components of the motion vector is less than 4, or equal to or greater than 4, an arbitrary threshold value may be set, and then the difference between the components of the motion vector may be compared with the threshold value. For example, P x component MV p0 and MV Q x component MV Q0 The difference between is greater than or equal to the threshold value Th0, or MV P y component MV P1 and MV Q y component MV Q1 When the difference between bS and Th0 is equal to or greater than a threshold value Th1, bS can be set to 1 (or 2 if block P and / or block Q are coded in intra prediction mode). In this case, Th0 and Th1 can be the same. For example, when the threshold is small, the number of cases where the value of bS is 0 is reduced, so that the threshold value Th0 / Th1 can be set to a value smaller than 4 (2 or 3) to reduce the number of cases where the value of bS is 0.

[0399] <Equation 7> shows an example of a method for determining whether the bS value is set to 0 or 1 by the above method.

[0400] <Formula 7> (1) pcMV P0 -= pcMV Q0 ; pcMV P0 -= pcMV Q0 ; (2) uiBs = (pcMVP0.getAbsHor() >= th) | (pcMVP0.getAbsVer() >= th) | (pcMVP1.getAbsHor() >= th) | (pcMVP1.getAbsVer() >= th);

[0401] In Equation 3, (1) calculates the difference between the x components and the y components of the motion vectors of blocks P and Q, and (2) determines whether the difference between each component is greater than a threshold value.

[0402] On the other hand, to reduce the complexity of the deblocking filter, c You can also remove the _offset.

[0403] As explained above in the method of removing block noise from the chrominance component, the average value of the quantization parameters for blocks P and Q taking into account the approximate values ​​is qP L (1) When the bS value is greater than a predetermined value (e.g., 2 or 1), t c is the quantization parameter Q=Clip(0,55,qP L (2) When the bS value is equal to or less than a predetermined value (e.g., 2 or 1), t c is the quantization parameter Q=qP L can be determined to be a value corresponding to

[0404] In this case, the quantization parameter Q and t c The correspondence between can be identified through a table.

[0405] Table 3 shows the block removal parameters (Q, t c , β) as an example of the correspondence relationship between the [Table 3]

[0406] In Table 3, for convenience of explanation, β and t c However, the present invention is not limited thereto. For example, Table 3 shows that β' and t c ', in which case t c and β is t c =t c ´*(1<<(BitDepthY-8)), β=β´*(1<<(BitDepthY-8)) to get t c ' and β'.

[0407] As mentioned above, t c and β may be a criterion for determining whether to apply strong filtering. For example, when the three samples of P closest to the edge are p0, P1, and P2 in order, and the three samples of Q closest to the edge are q0, q1, and q2 in order, (1) if abs(p2-2p1+p0)+abs(q2-2q1+q0)=dPq, it can be determined whether dPq is smaller than (β>>2). (2) By further considering samples other than p0, p1, p2, and q0, q1, and q2, for example, p3 and q3, it can be determined whether abs(p3-p0)+abs(q0-q3) is smaller than (β>>3). (3) Also, for two samples p0 and q0 on the left and right of the boundary, if abs(p0-q0) is smaller than (5*t c +1)>>1. As mentioned above, the determination can be made on multiple columns or rows within a block. For example, for a vertical edge, multiple rows can be selected and (1) through (3) can be determined for each row, and for a horizontal edge, multiple columns can be selected and (1) through (3) can be determined for each column.

[0408] For vertical edges, if the results of (1) to (3) for multiple rows are all determined to be less than the criterion, strong filtering can be applied to the edge. For horizontal edges, if the results of (1) to (3) for multiple columns are all determined to be less than the criterion, strong filtering can be applied to the edge.

[0409] Quantization parameter QP of the luma samples for block P P and the quantization parameter QP of the luma samples for block Q. Qと Using the quantization parameter qP L qP L =((QP Q +QP P +1)>>1).

[0410] When bS is derived from one of the five values, if bS is greater than 2, the quantization parameter Q = Clip3(0, 55, qP L +2), and the quantization parameter Q and the β value correspond to t c The values ​​can be obtained from Table 3. In this case, when bS is less than or equal to 2, Q = qP L , and the quantization parameter Q and the β value are set to t c The values ​​and can be obtained from .

[0411] On the other hand, when bS is derived from one of the three values ​​(for example, in the examples of FIG. 12 to FIG. 14), the quantization Q value is determined to be one value regardless of the bS value, and then the t corresponding to the determined quantization parameter Q value and β value is calculated. c The value can be obtained from Table 3. For example, if the bS value is derived from one of the three values ​​(0, 1, 2), the quantization parameter Q = Clip3(0, 55, qP L +2*bS-2), and the quantization parameter Q and β values ​​are determined as t c Values ​​can be taken from .

[0412] On the other hand, when determining the quantization parameter Q value, in addition to the bS value, the quantization parameters and bS values ​​of the blocks P and Q, t c Consider the value of _offset to get a more accurate t c It is also possible to obtain the value of t transmitted from the slice header. c The quantization parameter Q value can be determined by reflecting the _offset information.

[0413] t transferred from slice header c The _offset information is a value transferred to apply the optimized deblocking filter for each slice, and is t for a slice that contains q samples adjacent to an edge. c The _offset information can be expressed as slice_tc_offset_div2. slice_tc_offset_div2 is t c Specifies the value of the default block removal parameter offset for

[0414] In this case, the quantization parameter Q = Clip3(0, 55, qP L +2*bS-2+slice_tc_offset_div2<<1), and the variable t c can be determined based on the set quantization parameter Q and β. For example, t c Based on the quantization parameters Q and β, the quantization parameters Q, β, and t c This can be determined using a table that defines the relationship between

[0415] Therefore, the t transferred from the slice header c The Q value is determined as described above based on the slice_tc_offset information (slice_tc_offset_div2), and the t c The value of t can be determined. cAs described above, the value quantifies the block noise according to the degree of quantization, and may be used as a criterion for determining the range of filtered pixel values ​​(clip range) when applying a deblocking filter, or may be used as a criterion for determining whether to apply strong filtering or weak filtering.

[0416] FIG. 22 is a flow chart illustrating a method for encoding video according to the present invention.

[0417] Referring to FIG. 22, the encoding device divides an input image and performs prediction on a current block (S2210). The prediction on the current block may be performed by a prediction unit of the encoding device. The prediction unit may perform intra prediction or inter prediction on the current block. Whether to perform intra prediction or inter prediction may be determined in consideration of rate distortion optimization (RDO), etc.

[0418] When the skip mode is not applied, the prediction unit generates a prediction signal and can generate a residual signal that is the difference between the original video signal and the prediction signal.

[0419] The encoding apparatus may transform and quantize the residual signal (S2220). The transformation of the residual signal may be performed in a transform unit, and the quantization of the transformed signal (e.g., transform coefficients) may be performed in a quantization unit.

[0420] The transformed and quantized signal can be transmitted through an entropy coding process.

[0421] The encoding apparatus inversely quantizes and inversely transforms the transformed and quantized signal to restore the current block (S2230). The inversely quantized and inverse transformed signal is added to the residual signal to restore the original image signal.

[0422] The encoding apparatus may apply a deblocking filter to the restored signal (S2240). The restored signal may be restored to a signal closer to the original image by the deblocking filter. The deblocking filter may be implemented in a filter unit, and the filter unit may apply SAO after applying the deblocking filter.

[0423] The specific method of the block distortion removal filter has been described above with reference to the drawings.

[0424] The signal to which the deblocking filter has been applied is stored in a memory such as a decoded picture buffer (DPB) and can be used as a reference for predicting other blocks or other pictures.

[0425] Here, it has been described that a residual signal is generated and transmitted by prediction, but when the skip mode is applied, the residual signal is not generated / transmitted.

[0426] FIG. 23 is a flow chart that generally illustrates a method for decoding video in accordance with the present invention.

[0427] Referring to FIG. 23, the decoding device entropy decodes a received bitstream and performs prediction for a current block (S2310). The prediction for the current block may be performed by a prediction unit in the decoding device. The prediction unit may perform inter prediction or intra prediction for the current block based on information notified from the encoding device. The prediction unit generates a prediction signal (prediction block) for the current block through prediction.

[0428] The decoding device reconstructs the current block based on the prediction for the current block (S2320). The decoding device generates a residual signal (residual block) through inverse quantization / inverse transform from the bitstream received from the encoding device, and generates a reconstructed signal (reconstructed block) by adding a prediction signal (prediction block) and the residual signal (prediction block). When a skip mode is applied, the residual signal is not transmitted and the prediction signal can be used as the reconstructed signal.

[0429] The decoder applies a deblocking filter to the reconstructed signal (reconstructed block) (S2330). The deblocking filter can be implemented in a filter unit within the decoder. The filter unit applies the deblocking filter to the reconstructed block to modify the reconstructed block to more closely resemble the original image block.

[0430] The specific contents of the block distortion removal filter have been described in detail with reference to the previous drawings.

[0431] After applying the deblocking filter, the filter unit may also apply SAO to the reconstructed block based on information received from the encoding device.

[0432] The signal restored through the filter unit can be stored in a memory such as a DPB and can be used as a reference for predicting other blocks or other pictures, and can also be output as a restored image.

[0433] In order to facilitate understanding of the invention, Figures 22 and 23 are intended to roughly explain the application of the deblocking filter according to the present invention to the encoding / decoding process, and it should be noted that the encoding / decoding process described in detail in conjunction with the previous figures can be applied to both.

[0434] FIG. 24 is a flow chart that generally illustrates an example of a method for deriving bS in accordance with the present invention.

[0435] 24, a boundary for determining bS is derived (S2410). The boundary for determining bS may be a boundary of a unit block to which a deblocking filter is applied. Alternatively, the boundary for determining bS may be a boundary of a unit block to which bS is determined. Alternatively, the boundary for determining bS may be a boundary of a unit block to which a deblocking filter is applied and a boundary of a unit block to which bS is determined.

[0436] When the boundary for determining bS is derived, bS is set for each bS setting unit (S2420). If the boundary for determining bS is the boundary of a unit block to which a deblocking filter is applied, bS can be set for each edge that is the boundary for determining bS and corresponds to the boundary of the bS determination unit block. If the boundary for determining bS is the boundary of a unit block to which a bS removal filter is applied, bS can be set for an edge that is the boundary for determining bS and corresponds to the boundary of a unit block to which a deblocking filter is applied. If the boundary for determining bS is the boundary of a unit block to which a deblocking filter is applied and corresponds to the boundary of a unit block to which bS is determined, bS can be set for the boundary for determining bS.

[0437] As described above, the method of setting bS can be to derive the bS for the boundary to any one of five bS values, or to derive the bS for the boundary to any one of three bS values. In addition, a method of deriving bS with a lower degree of complexity can be applied. The specific method of deriving / determining bS is as described above.

[0438] In FIG. 24, for ease of explanation, bS is determined for an edge that is a boundary of a bS determination unit block and also a boundary of a block for removing block distortion filtering. However, the present invention is not limited to this, and bS can also be determined using the method of determining a representative value described above, or the like.

[0439] In the above exemplary system, the method is described as a series of steps or blocks and based on a sequence, but the present invention is not limited to the sequence of steps, and some steps may occur in a different sequence or simultaneously with other steps described above. Also, the above-described embodiments include examples of various aspects. Therefore, the present invention can include all other substitutions, modifications, and alterations that fall within the scope of the following claims.

[0440] Up to now, when a component is said to be "coupled" or "connected" to another component in the description of the present invention, it should be understood that the component may be directly coupled or connected to the other component, but there may be other components between the two components. On the other hand, when a component is said to be "directly coupled" or "directly connected" to another component, it should be understood that there is no other component between the two components.

Claims

1. A block distortion removal filter processing method for an image encoding device, comprising the steps of: deriving a boundary of a deblocking filtering unit block, which is a unit block on which deblocking filtering is performed in the reconstructed current picture; setting a bS (boundary strength) of a boundary of a bS-setting unit block in the restored current picture; applying deblocking filtering to the boundaries of the deblocking filtering unit blocks based on the bS; the step of setting the bS includes a step of setting the bS for a target boundary that is an overlapping boundary between the bS-setting unit block and the block distortion removal filtering unit block, the bS is set to one of the values ​​0, 1, and 2; determining whether the deblocking filter is applicable to the luma and chroma samples based on the bS; if the bS is greater than 0, the deblocking filtering is applied to the luma samples; if the bS is greater than 1, the deblocking filtering is applied to the chroma samples; In a first case where at least one of the two blocks adjacent to the object boundary is coded in an intra prediction mode, the bS is set to 2; If not, A method according to claim 1, wherein the bS is set to 1 in a second case where at least one of the two blocks contains non-zero transform coefficients or the two blocks have different reference pictures.

2. The step of setting bS comprises: when the derived boundary of the deblocking filter processing unit block is a vertical boundary, setting the value of the bS of the target boundary which is a boundary where the vertical boundary of the bS setting unit block and the vertical boundary of the deblocking filter processing unit block overlap; and if the derived boundary of the deblocking filtering unit block is a horizontal boundary, setting the value of the bS of the target boundary which is an overlapping boundary of the horizontal boundary of the bS setting unit block and the horizontal boundary of the deblocking filtering unit block.

3. The method of claim 1 , wherein if the bS of the object boundary is 2 or 1, then the deblocking filtering is applicable to the object boundary.

4. 2. The method of claim 1 , wherein the steps of deriving the boundary of the deblocking filtering unit block and setting the bS are performed first on a vertical edge in the reconstructed current picture that contains the deblocking filtering unit block and second on a horizontal edge in the reconstructed current picture that contains the deblocking filtering unit block.

5. 2. The method of claim 1, wherein if the value of the bS set for the object boundary is greater than 0 and the deblocking filtering is performed on the object boundary, it is determined whether strong or weak filtering is applied.

6. the decision as to whether strong or weak filtering is applied is based on samples of the two blocks having the object boundary as a boundary between the two blocks; The determination of whether strong or weak filtering is applied may be performed by: if the target boundary is a vertical boundary, the deblocking filtering is performed on samples in the sample row having the target boundary as a boundary between sample rows, and The method of claim 5 , wherein, if the object boundary is a horizontal boundary, the deblocking filtering is performed based on samples in the sample sequence that have the object boundary as a boundary between sample sequences.

7. The method of claim 1 , wherein the deblocking filtering unit block is an 8×8 pixel block.

8. The method of claim 1 , wherein the bS setting unit block is a 4×4 pixel block.

9. 1. A method for transmitting data relating to image information, comprising the steps of: obtaining a bitstream of the image information including information regarding a deblocking filtering process, the information regarding the deblocking filtering process comprising: Deriving a boundary of a deblocking filtering unit block, which is a unit block on which deblocking filtering is performed in the reconstructed current picture; Setting a bS (boundary strength) of a boundary of a bS-setting unit block in the restored current picture; applying deblocking filtering to the boundary of the deblocking filtering unit block based on the bS; encoding image information including information related to the deblocking filtering to generate the bitstream; transmitting the bitstream of image information including the information regarding the deblocking filtering; setting the bS includes setting the bS for a target boundary that is an overlapping boundary between the bS-setting unit block and the block distortion removal filtering unit block; the bS is set to one of the values ​​0, 1, and 2; determining whether the deblocking filter is applicable to the luma and chroma samples based on the bS; if the bS is greater than 0, the deblocking filtering is applied to the luma samples; if the bS is greater than 1, the deblocking filtering is applied to the chroma samples; In a first case where at least one of the two blocks adjacent to the object boundary is coded in an intra prediction mode, the bS is set to 2; If not, A method according to claim 1, wherein the bS is set to 1 in a second case where at least one of the two blocks contains non-zero transform coefficients or the two blocks have different reference pictures.

Citation Information

Patent Citations

  • Video encoding method and video encoding apparatus and video decoding method and video decoding apparatus, which perform deblocking filtering based on tree-structure encoding units

    WO2011129619A2

  • Determining boundary strength values for deblocking filtering for video coding

    WO2013063117A1