A deblocking filtering method, by a video decoding apparatus, the method comprising: reconstructing a picture in blocks of coding units (CUs), comprising prediction units (PUs), and transform units (TUs); (S310) deriving a boundary of a deblocking filtering unit block which is a block of the reconstructed picture for which deblocking filtering is performed; (S320; S1710) setting a boundary strength bS of a boundary of a bS setting unit block , wherein the bS setting unit block is a sub-block of a deblocking filtering unit block, wherein the step (S320; S1710) of setting the bS includes setting the bS for a target boundary, which is the boundary of a deblocking filtering unit block that is matching the boundary of the bS setting unit block; and (S330; S1720) applying deblocking filtering on the target boundary based on the bS, characterized in that the bS is set to a value among 0, 1 and 2 (S1410; S1430; S1450), wherein when at least one of two blocks which are adjacent to the target boundary is coded with intra prediction mode, the bS is set to the value 2 (S1420); otherwise, when at least one of the two blocks includes a transform coefficient other than 0, or the two blocks have different reference pictures, or have different motion vectors, the bS is set to the value 1 (S1440, S1450); otherwise, the bS is set to the value 0 (S1470); wherein when the bS is equal to the value 0, the deblocking filtering is not applied, wherein when the bS is greater than the value 0, the deblocking filtering is applied to a luma sample, and wherein when the bS is greater than the value 1, the deblocking filtering is applied to a chroma sample. reconstructing a picture in blocks of coding units (CUs), comprising prediction units (PUs), and transform units (TUs); (S310) deriving a boundary of a deblocking filtering unit block which is a block of the reconstructed picture for which deblocking filtering is performed; (S320; S1710) setting a boundary strength bS of a boundary of a bS setting unit block , wherein the bS setting unit block is a sub-block of a deblocking filtering unit block, wherein the step (S320; S1710) of setting the bS includes setting the bS for a target boundary, which is the boundary of a deblocking filtering unit block that is matching the boundary of the bS setting unit block; and (S330; S1720) applying deblocking filtering on the target boundary based on the bS, characterized in that the bS is set to a value among 0, 1 and 2 (S1410; S1430; S1450), wherein when at least one of two blocks which are adjacent to the target boundary is coded with intra prediction mode, the bS is set to the value 2 (S1420); otherwise, when at least one of the two blocks includes a transform coefficient other than 0, or the two blocks have different reference pictures, or have different motion vectors, the bS is set to the value 1 (S1440, S1450); otherwise, the bS is set to the value 0 (S1470); wherein when at least one of two blocks which are adjacent to the target boundary is coded with intra prediction mode, the bS is set to the value 2 (S1420); otherwise, when at least one of the two blocks includes a transform coefficient other than 0, or the two blocks have different reference pictures, or have different motion vectors, the bS is set to the value 1 (S1440, S1450); otherwise, the bS is set to the value 0 (S1470); wherein when the bS is equal to the value 0, the deblocking filtering is not applied, wherein when the bS is greater than the value 0, the deblocking filtering is applied to a luma sample, and wherein when the bS is greater than the value 1, the deblocking filtering is applied to a chroma sample. <EOS>